Platforms: Mac
The aetypes defines classes used to represent Apple Event data descriptors and Apple Event object specifiers.
Apple Event data is contained in descriptors, and these descriptors are typed. For many descriptors the Python representation is simply the corresponding Python type: typeText in OSA is a Python string, typeFloat is a float, etc. For OSA types that have no direct Python counterpart this module declares classes. Packing and unpacking instances of these classes is handled automatically by aepack.
An object specifier is essentially an address of an object implemented in a Apple Event server. An Apple Event specifier is used as the direct object for an Apple Event or as the argument of an optional parameter. The aetypes module contains the base classes for OSA classes and properties, which are used by the packages generated by gensuitemodule to populate the classes and properties in a given suite.
For reasons of backward compatibility, and for cases where you need to script an application for which you have not generated the stub package this module also contains object specifiers for a number of common OSA classes such as Document, Window, Character, etc.
The AEObjects module defines the following classes to represent Apple Event descriptor data:
The representation of OSA descriptor data for which the aepack and aetypes modules have no support, i.e. anything that is not represented by the other classes here and that is not equivalent to a simple Python value.
An enumeration value with the given 4-character string value.
Position pos in object of.
A boolean.
Text with style information (font, face, etc) included.
Text with script system and style information included.
Text with script system and language information included.
Script system and language information.
A quickdraw point.
A quickdraw rectangle.
A color.
An OSA type value with the given 4-character name.
An OSA keyword with the given 4-character name.
A range.
Non-numeric absolute positions, such as "firs", first, or "midd", middle.
The logical expression of applying operator logc to term.
The comparison relo of obj1 to obj2.
The following classes are used as base classes by the generated stub packages to represent AppleScript classes and properties in Python:
Abstract baseclass for an OSA class. The subclass should set the class attribute want to the 4-character OSA class code. Instances of subclasses of this class are equivalent to AppleScript Object Specifiers. Upon instantiation you should pass a selector in which, and optionally a parent object in fr.
Abstract baseclass for an OSA property. The subclass should set the class attributes want and which to designate which property we are talking about. Instances of subclasses of this class are Object Specifiers.
Base class of ComponentItem and NProperty, a general OSA Object Specifier. See the Apple Open Scripting Architecture documentation for the parameters. Note that this class is not abstract.
关于本评注系统
本站使用上下文关联的评注系统来收集反馈信息。不同于一般对整章做评注的做法, 我们允许你对每一个独立的“文本块”做评注。一个“文本块”看起来是这样的:
一个“文本块”是一个段落,一个列表项,一段代码,或者其他一小段内容。 你选中它会高亮度显示:
要对文本块做评注,你只需要点击它旁边的标识块:
我们会仔细阅读每个评论,如果可能的话我们也会把评注考虑到未来的版本中去:
如果你愿意你的评注被采用,请确保留下你的全名 (注意不是昵称或简称)
Many, many thanks to Jack Slocum; the inspiration and much of the code for the comment system comes from Jack's blog, and this site couldn't have been built without his wonderful
YAHOO.extlibrary. Thanks also to Yahoo for YUI itself.