标题: 这对象把我整得魔障了 [打印本页] 作者: lhlabfaogo 时间: 2022-7-19 20:11 标题: 这对象把我整得魔障了 Object model overview
The API is exposed through a set of objects. An object has events, methods and properties that you can use to both query and edit the object.
To start customising the software using the API, you should first learn about the structure of the API. This structure is often referred to as the object model. An overview of the object model is given here. Detail of each object, its events, methods and properties can be found in subsequent sections of the online help.
At the top of the object model hierarchy is the Application object. All other objects in the model are located below the Application object, and can be accessed via this top-level object. Detailed knowledge of the object model hierarchy will mean that you can readily traverse through the hierarchy to gain access to a particular type of object.
A large number of objects in the API can only be accessed indirectly. In such cases you must reference the object from another object higher in the object hierarchy. For example, the MacArguments object can only be accessed indirectly. It cannot exist on its own, in fact the MacArguments object exists only as a member of the MacCommand object. Therefore access to the MacArguments object is possible only from the MacCommand object.
Another concept vital to the API is the collection object. A collection object is a special type of object, allowing iteration over an existing set of objects. All collection objects support the Count property and the Item method. Count returns the number of items in the collection while Item returns the indicated item in the collection. Further properties and methods are defined according to requirements for each collection object. An example of a collection object is the MacCommands collection. In addition