Exceptions raised during renaming in rotating file handlers are now passed to handleE...
[python.git] / Doc / mac / libaetypes.tex
blobf7d8f8b193c9199e65845458f56ca93e7177a7fe
1 \section{\module{aetypes} ---
2 AppleEvent objects}
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}
11 The \module{aetypes} defines classes used to represent Apple Event data
12 descriptors and Apple Event object specifiers.
14 Apple Event data is contained in descriptors, and these descriptors
15 are typed. For many descriptors the Python representation is simply the
16 corresponding Python type: \code{typeText} in OSA is a Python string,
17 \code{typeFloat} is a float, etc. For OSA types that have no direct
18 Python counterpart this module declares classes. Packing and unpacking
19 instances of these classes is handled automatically by \module{aepack}.
21 An object specifier is essentially an address of an object implemented
22 in a Apple Event server. An Apple Event specifier is used as the direct
23 object for an Apple Event or as the argument of an optional parameter.
24 The \module{aetypes} module contains the base classes for OSA classes
25 and properties, which are used by the packages generated by
26 \module{gensuitemodule} to populate the classes and properties in a
27 given suite.
29 For reasons of backward compatibility, and for cases where you need to
30 script an application for which you have not generated the stub package
31 this module also contains object specifiers for a number of common OSA
32 classes such as \code{Document}, \code{Window}, \code{Character}, etc.
36 The \module{AEObjects} module defines the following classes to represent
37 Apple Event descriptor data:
39 \begin{classdesc}{Unknown}{type, data}
40 The representation of OSA descriptor data for which the \module{aepack}
41 and \module{aetypes} modules have no support, i.e. anything that is not
42 represented by the other classes here and that is not equivalent to a
43 simple Python value.
44 \end{classdesc}
46 \begin{classdesc}{Enum}{enum}
47 An enumeration value with the given 4-character string value.
48 \end{classdesc}
50 \begin{classdesc}{InsertionLoc}{of, pos}
51 Position \code{pos} in object \code{of}.
52 \end{classdesc}
54 \begin{classdesc}{Boolean}{bool}
55 A boolean.
56 \end{classdesc}
58 \begin{classdesc}{StyledText}{style, text}
59 Text with style information (font, face, etc) included.
60 \end{classdesc}
62 \begin{classdesc}{AEText}{script, style, text}
63 Text with script system and style information included.
64 \end{classdesc}
66 \begin{classdesc}{IntlText}{script, language, text}
67 Text with script system and language information included.
68 \end{classdesc}
70 \begin{classdesc}{IntlWritingCode}{script, language}
71 Script system and language information.
72 \end{classdesc}
74 \begin{classdesc}{QDPoint}{v, h}
75 A quickdraw point.
76 \end{classdesc}
78 \begin{classdesc}{QDRectangle}{v0, h0, v1, h1}
79 A quickdraw rectangle.
80 \end{classdesc}
82 \begin{classdesc}{RGBColor}{r, g, b}
83 A color.
84 \end{classdesc}
86 \begin{classdesc}{Type}{type}
87 An OSA type value with the given 4-character name.
88 \end{classdesc}
90 \begin{classdesc}{Keyword}{name}
91 An OSA keyword with the given 4-character name.
92 \end{classdesc}
94 \begin{classdesc}{Range}{start, stop}
95 A range.
96 \end{classdesc}
98 \begin{classdesc}{Ordinal}{abso}
99 Non-numeric absolute positions, such as \code{"firs"}, first, or \code{"midd"},
100 middle.
101 \end{classdesc}
103 \begin{classdesc}{Logical}{logc, term}
104 The logical expression of applying operator \code{logc} to
105 \code{term}.
106 \end{classdesc}
108 \begin{classdesc}{Comparison}{obj1, relo, obj2}
109 The comparison \code{relo} of \code{obj1} to \code{obj2}.
110 \end{classdesc}
112 The following classes are used as base classes by the generated stub
113 packages to represent AppleScript classes and properties in Python:
115 \begin{classdesc}{ComponentItem}{which\optional{, fr}}
116 Abstract baseclass for an OSA class. The subclass should set the class
117 attribute \code{want} to the 4-character OSA class code. Instances of
118 subclasses of this class are equivalent to AppleScript Object
119 Specifiers. Upon instantiation you should pass a selector in
120 \code{which}, and optionally a parent object in \code{fr}.
121 \end{classdesc}
123 \begin{classdesc}{NProperty}{fr}
124 Abstract baseclass for an OSA property. The subclass should set the class
125 attributes \code{want} and \code{which} to designate which property we
126 are talking about. Instances of subclasses of this class are Object
127 Specifiers.
128 \end{classdesc}
130 \begin{classdesc}{ObjectSpecifier}{want, form, seld\optional{, fr}}
131 Base class of \code{ComponentItem} and \code{NProperty}, a general
132 OSA Object Specifier. See the Apple Open Scripting Architecture
133 documentation for the parameters. Note that this class is not abstract.
134 \end{classdesc}