summaryrefslogtreecommitdiffstats
path: root/Doc/mac/libaepack.tex
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-04-11 15:35:28 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-04-11 15:35:28 (GMT)
commitbae5c965e8d42c791ec42959f7b025f29f38926e (patch)
treeed1b941e4ad2284ab08562e24a0ac6cd19fbbd68 /Doc/mac/libaepack.tex
parent126f2b76b9413d861f3a8f7d70af67a634982e31 (diff)
downloadcpython-bae5c965e8d42c791ec42959f7b025f29f38926e.zip
cpython-bae5c965e8d42c791ec42959f7b025f29f38926e.tar.gz
cpython-bae5c965e8d42c791ec42959f7b025f29f38926e.tar.bz2
Moved all the scripting stuff to a separate section, added all the
missing bits (well, all the bits I could think of) and updated the rest.
Diffstat (limited to 'Doc/mac/libaepack.tex')
-rw-r--r--Doc/mac/libaepack.tex18
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]{