Important: The information in this document is obsolete and should not be used for new development.
AECallObjectAccessor
You can use theAECallObjectAccessor
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 theAEResolve
function, you can useAECallObjectAccessor
to invoke an object accessor function. This might be useful, for example, if you have installed an object accessor function usingtypeWildCard
for theAEInstallObjectAccessor
function'sdesiredClass
parameter andtypeAEList
for thecontainerType
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 callAECallObjectAccessor
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 specifytypeWildCard
as the value of thedesiredClass
parameter.To call an object accessor function whose entry in an object accessor dispatch table specifies
cProperty
, you must specifycProperty
as thedesiredClass
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.
noErr 0 No error occurred paramErr -50 AEObjectInit
was not called before this function was callederrAEAccessorNotFound -1723 No object accessor was found