[Pythonmac-SIG] NavServices: getting there...

Joseph J. Strout joe@strout.net
Tue, 20 Apr 1999 10:38:02 -0700


Well, I have a file that defines a bunch of the Nav Services data
structures, and manages to post the new Open File dialog!

But now, I don't know what to do with the result.  Nav returns its file
list as an AEDesc, which I have separated into a descriptor type and handle:

>>> reply.selDescriptorType
'list'
>>> reply.selDataHandle
58302896L


I know Python has the AE and aetools modules for dealing with AEDescs, but
I can't figure out how to convert the type and handle (stored as a long
int) above into an AEDesc which AE can deal with.  It's almost there -- but
AE.AECreateDesc requires a pointer, not a handle.  I can't find any way to
coerce an int to a handle, or even if I could, to convert a handle to a
pointer.  (Or, for that matter, to lock it as I probably should.)

Any tips will be greatly appreciated (and rewarded by earlier release of my
NavServices module!).

Cheers,
-- Joe
,------------------------------------------------------------------.
|    Joseph J. Strout           Biocomputing -- The Salk Institute |
|    joe@strout.net             http://www.strout.net              |
`------------------------------------------------------------------'