Fred Drake | 1bd905e | 2000-10-14 05:06:24 +0000 | [diff] [blame] | 1 | \section{\module{aetypes} --- |
| 2 | AppleEvent objects} |
| 3 | |
| 4 | \declaremodule{standard}{aetypes} |
| 5 | \platform{Mac} |
| 6 | %\moduleauthor{Jack Jansen?}{email} |
| 7 | \modulesynopsis{Python representation of the Apple Event Object Model.} |
| 8 | \sectionauthor{Vincent Marchetti}{vincem@en.com} |
| 9 | |
| 10 | |
| 11 | The \module{aetypes} defines classes used to represent Apple Event |
| 12 | object specifiers. An object specifier is essentially an address of an |
| 13 | object implemented in a Apple Event server. An Apple Event specifier |
| 14 | is used as the direct object for an Apple Event or as the argument of |
| 15 | an optional parameter. In AppleScript an object specifier is |
| 16 | represented by a phrase such as: |
| 17 | \code{character 23 of document "Semprini"}. The classes defined in |
| 18 | this module allow this specifier to be represented by a Python object |
| 19 | which is initialized as follows: |
| 20 | \code{res = Document(1).Character(23)} |
| 21 | |
| 22 | |
| 23 | The \module{AEObjects} module defines the following class: |
| 24 | |
| 25 | \begin{classdesc}{ObjectSpecifier}{want, form, seld, from} |
| 26 | This is the base class for representing object specifiers and is |
| 27 | generally not constructed directly by the user. Its important |
| 28 | functionality is to define an \function{__aepack__()} function, |
| 29 | which returns the Apple Event descriptor containing the object |
| 30 | specifier. Its data members, set directly from the constructor |
| 31 | arguments, are: |
| 32 | \end{classdesc} |
| 33 | |
| 34 | \begin{memberdesc}{want} |
| 35 | A four character string representing the class code of the |
| 36 | object. These class codes are specified in Apple Event Suites; for |
| 37 | example the standard code for a character object is the 4 bytes |
| 38 | \samp{char}. |
| 39 | \end{memberdesc} |