Important: The information in this document is obsolete and should not be used for new development.
AEInstallObjectAccessor
You can use theAEInstallObjectAccessor
function to add an entry for an object accessor function to either the application's object accessor dispatch table or the system object accessor dispatch table.
FUNCTION AEInstallObjectAccessor (desiredClass: DescType; containerType: DescType; theAccessor: AccessorProcPtr; accessorRefcon: LongInt; isSysHandler: Boolean): OSErr;
desiredClass
- The object class of the Apple event objects to be located by the object accessor function for this table entry.
containerType
- The descriptor type of the token used to specify the container for the desired objects. The object accessor function finds objects in containers specified by tokens of this type.
theAccessor
- A pointer to the object accessor function for this table entry. Note that an object accessor function listed in the system dispatch table must reside in the system heap; thus, if the value of the
isSysHandler
parameter isTRUE
, thetheAccessor
parameter should point to a location in the system heap. Otherwise, if you put your system object accessor function in your application heap, you must callAERemoveObjectAccessor
to remove the function before your application terminates.accessorRefcon
- A reference constant passed by the Apple Event Manager to the object accessor function whenever the function is called. If your object accessor function doesn't use a reference constant, use 0 as the value of this parameter. To change the value of the reference constant, you must call
AEInstallObjectAccessor
again.isSysHandler
- A value that specifies the object accessor dispatch table to which the entry is added. If the value of
isSysHandler
isTRUE
, the Apple Event Manager adds the entry to the system object accessor dispatch table. Entries in the system object accessor dispatch table are available to all applications running on the same computer. If the value isFALSE
, the Apple Event Manager adds the entry to your application's object accessor table. When searching for object accessor functions, the Apple Event Manager searches the application's object accessor dispatch table first; it searches the system object accessor dispatch table only if the necessary function is not found in your application's object accessor dispatch table.DESCRIPTION
TheAEInstallObjectAccessor
function adds an entry to either the application or system object accessor dispatch table. You must supply parameters that specify the object class of the Apple event objects that the object accessor function can locate, the descriptor type of tokens for containers in which the object accessor function can locate objects, the address of the object accessor function for which you are adding an entry, and whether the entry is to be added to the system object accessor dispatch table or your application's object accessor dispatch table. You can also specify a reference constant that the Apple Event Manager passes to your object accessor function each time the Apple Event Manager calls the function.RESULT CODES
noErr 0 No error occurred paramErr -50 The handler pointer is NIL
or odd, orAEObjectInit
was not called before this functionSEE ALSO
For more information about installing object accessor functions, see "Installing Entries in the Object Accessor Dispatch Tables," which begins on page 6-27.For a description of the
AERemoveObjectAccessor
function, see page 6-96.