diff options
Diffstat (limited to 'Doc/mac/libaepack.tex')
-rw-r--r-- | Doc/mac/libaepack.tex | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Doc/mac/libaepack.tex b/Doc/mac/libaepack.tex index b8276be..6c275bd 100644 --- a/Doc/mac/libaepack.tex +++ b/Doc/mac/libaepack.tex @@ -45,7 +45,7 @@ the Python string representation of a value (the repr() function) encoded as a text descriptor. \end{funcdesc} -\begin{funcdesc}{unpack}{x} +\begin{funcdesc}{unpack}{x\optional{, formodulename}} \var{x} must be an object of type \class{AEDesc}. This function returns a Python object representation of the data in the Apple Event descriptor \var{x}. Simple AppleEvent data types (integer, @@ -53,16 +53,26 @@ encoded as a text descriptor. Apple Event lists are returned as Python lists, and the list elements are recursively unpacked. Object references (ex. \code{line 3 of document 1}) are returned as instances of - \class{aetypes.ObjectSpecifier}. AppleEvent descriptors with + \class{aetypes.ObjectSpecifier}, unless \code{formodulename} + is specified. AppleEvent descriptors with descriptor type typeFSS are returned as \class{FSSpec} objects. AppleEvent record descriptors are returned as Python - dictionaries, with keys of type \class{?} and elements recursively + dictionaries, with 4-character string keys and elements recursively unpacked. + + The optional \code{formodulename} argument is used by the stub packages + generated by \module{gensuitemodule}, and ensures that the OSA classes + for object specifiers are looked up in the correct module. This ensures + that if, say, the Finder returns an object specifier for a window + you get an instance of \code{Finder.Window} and not a generic + \code{aetypes.Window}. The former knows about all the properties + and elements a window has in the Finder, while the latter knows + no such things. \end{funcdesc} \begin{seealso} - \seemodule{AE}{Built-in access to Apple Event Manager routines.} + \seemodule{Carbon.AE}{Built-in access to Apple Event Manager routines.} \seemodule{aetypes}{Python definitions of codes for Apple Event descriptor types.} \seetitle[http://developer.apple.com/techpubs/mac/IAC/IAC-2.html]{ |