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


AECallObjectAccessor

You can use the AECallObjectAccessor function to invoke one of your application's object accessor functions.

FUNCTION AECallObjectAccessor (desiredClass: DescType; 
                               containerToken: AEDesc; 
                               containerClass: DescType; 
                               keyForm: DescType; 
                               keyData: AEDesc; 
                               VAR theToken: AEDesc): OSErr;
desiredClass
The object class of the desired Apple event objects.
containerToken
The token that identifies the container for the desired objects.
containerClass
The object class of the container for the desired objects.
keyForm
The key form specified by the object specifier record for the object or objects to be located.
keyData
The key data specified by the object specifier record for the object or objects to be located.
theToken
The object accessor function that is invoked returns a token specifying the desired object or objects in this parameter.
DESCRIPTION
If you want your application to do some of the Apple event object resolution normally performed by the AEResolve function, you can use AECallObjectAccessor to invoke an object accessor function. This might be useful, for example, if you have installed an object accessor function using typeWildCard for the AEInstallObjectAccessor function's desiredClass parameter and typeAEList for the containerType parameter. To return a list of tokens for a request like "every line that ends in a period," the object accessor function can create an empty list, then call AECallObjectAccessor for each requested element, adding tokens for each element to the list one at a time.

The parameters of AECallObjectAccessor are identical to the parameters of an object accessor function, with one exception: the parameter that specifies the reference constant passed to the object accessor function whenever it is called is added by the Apple Event Manager when it calls the object accessor function.

To call 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.

To call an object accessor function whose entry in an object accessor dispatch table specifies cProperty, you must specify cProperty as the desiredClass parameter.

RESULT CODES
In addition to the following result codes, AECallObjectAccessor returns any other result codes returned by the object accessor function that is called.
noErr0No error occurred
paramErr-50AEObjectInit was not called before this function was called
errAEAccessorNotFound-1723No object accessor was found


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996