Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Interapplication Communication /
Chapter 6 - Resolving and Creating Object Specifier Records / Reference to Resolving and Creating Object Specifier Records
Routines for Resolving and Creating Object Specifier Records / Getting, Calling, and Removing Object Accessor Functions


AEGetObjectAccessor

You can use the AEGetObjectAccessor function to get a pointer to an object accessor function and the value of its reference constant.

FUNCTION AEGetObjectAccessor (desiredClass: DescType; 
                              containerType: DescType;
                              VAR theAccessor: AccessorProcPtr;
                              VAR accessorRefcon: LongInt; 
                              isSysHandler: Boolean): OSErr;
desiredClass
The object class of the Apple event objects located by the requested object accessor function. This parameter can also contain the constant typeWildCard or the constant cProperty.
containerType
The descriptor type of the token that identifies the container for the objects located by the requested object accessor function. This parameter can also contain the constant typeWildCard.
theAccessor
The AEGetObjectAccessor function returns a pointer to the requested object accessor function in this parameter.
accessorRefcon
The AEGetObjectAccessor function returns the reference constant from the object accessor dispatch table entry for the specified object accessor function in this parameter.
isSysHandler
A value that specifies the object accessor table from which to get the object accessor function and its reference constant. If the value of isSysHandler is TRUE, AEGetObjectAccessor gets the function from the system object accessor dispatch table. If the value of isSysHandler is FALSE, AEGetObjectAccessor gets the function from the application's object accessor dispatch table.
DESCRIPTION
The AEGetObjectAccessor function returns a pointer to the object accessor function installed for the object class specified in the desiredClass parameter and the descriptor type specified in the containerType parameter. It also returns the reference constant associated with the specified function. You must supply a value in the isSysHandler parameter that specifies which object accessor dispatch table you want to get the function from.

Calling AEGetObjectAccessor does not remove the object accessor function from an object accessor dispatch table.

To get an object accessor function whose entry in an object accessor dispatch table specifies typeWildCard as the object class, you must specify typeWildCard as the value of the desiredClass parameter. Similarly, to get an object accessor function whose entry in an object accessor dispatch table specifies typeWildCard as the descriptor type of the token used to specify the container, you must specify typeWildCard as the value of the containerType parameter.

To get an object accessor function whose entry in an object accessor dispatch table specifies cProperty (a constant used to specify a property of any object class), you must specify cProperty as the desiredClass parameter.

RESULT CODES
noErr0No error occurred
paramErr-50AEObjectInit was not called before this function was called
errAEAccessorNotFound-1723There is no object accessor function for the specified object class and container type

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996