[Pythonmac-SIG] AE support and FSRef

Alexandre Parenteau aparente@adobe.com
Mon, 28 Jan 2002 16:52:25 -0800


Hello,

Trying to use FSRef with MacPython and AppleEvents, I run into all sort of
N/A :

1) There is no typeFSRef in AppleEvents.py
2) there is no pack/unpack in aepack.py for FSRef
3) no AEPutKeyDesc support in _AEModule.c
4) no Alias, as_pathname... In macfsmodule.c
5) no RawFSRef in macfsmodule.c (see aepack.py)

Did you plan to add these to MacPython ? Are you interested in a patch ? If
so, in which CVS branch are you working ?

Another related thing : in GenericEventHandler of _AEModule.c it would help
a lot if we had a function like :

PyObject *AEDesc_New_FromMacOS(AEDesc *itself)

This function would create a python AEDesc object which doesn't call
AEDisposeDesc when destroyed (by possibly adding a boolean in AEDescObject).
This would avoid us from doing the ugly :

    requestObject->ob_itself.descriptorType = 'null';
    requestObject->ob_itself.dataHandle = NULL;
    replyObject->ob_itself.descriptorType = 'null';
    replyObject->ob_itself.dataHandle = NULL;
    Py_DECREF(args);

... Which took me some time to understand...

If we had that, we could pass safely AEDesc coming from MacOS API to Python.
I run in this problem because I'm working for fun on a Python context menu
plug in for the finder on OSX.

Alex.

-- 
Alexandre Parenteau
Computer Scientist
Core Technologies, AGM
Adobe Systems, Inc.
408-536-6166