Important: The information in this document is obsolete and should not be used for new development.
AECallObjectAccessor
You can use theAECallObjectAccessorfunction 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 theAEResolvefunction, you can useAECallObjectAccessorto invoke an object accessor function. This might be useful, for example, if you have installed an object accessor function usingtypeWildCardfor theAEInstallObjectAccessorfunction'sdesiredClassparameter andtypeAEListfor thecontainerTypeparameter. 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 callAECallObjectAccessorfor each requested element, adding tokens for each element to the list one at a time.The parameters of
AECallObjectAccessorare 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
typeWildCardas the object class, you must specifytypeWildCardas the value of thedesiredClassparameter.To call an object accessor function whose entry in an object accessor dispatch table specifies
cProperty, you must specifycPropertyas thedesiredClassparameter.RESULT CODES
In addition to the following result codes,AECallObjectAccessorreturns any other result codes returned by the object accessor function that is called.
noErr 0 No error occurred paramErr -50 AEObjectInitwas not called before this function was callederrAEAccessorNotFound -1723 No object accessor was found