Important: The information in this document is obsolete and should not be used for new development.
AEResolve
You can use theAEResolve
function to resolve an object specifier record in an Apple event parameter.
FUNCTION AEResolve (objectSpecifier: AEDesc; callbackFlags: Integer; VAR theToken: AEDesc): OSErr;
objectSpecifier
- The object specifier record to be resolved.
callbackFlags
- A value that determines what additional assistance, if any, your application can give the Apple Event Manager when it parses the object specifier record. The value is specified by adding the following constants, as appropriate:
CONST kAEIDoMinimum = $0000; {supports minimum } { callbacks only} kAEIDoWhose = $0001; {supports formWhose} kAEIDoMarking = $0004; {provides marking } { functions}
theToken
- The
AEResolve
function returns, in this parameter, a token that identifies the Apple event objects specified by theobjectSpecifier
parameter. Your object accessor functions may need to create many tokens to resolve a single object specifier record; this parameter contains only the final token that identifies the requested Apple event object. If an error occurs,AEResolve
returns a null descriptor record.DESCRIPTION
TheAEResolve
function resolves the object specifier record passed in theobjectSpecifier
parameter with the help of the object accessor functions and object callback functions provided by your application.RESULT CODES
In addition to the result codes listed here,
noErr 0 No error occurred paramErr -50 AEObjectInit
was not called before this function was callederrAEHandlerNotFound -1717 The necessary object callback function was not found (this result is returned only for object callback functions; errAEAccessorNotFound
[-1723] is returned when an object accessor function is not found)errAEImpossibleRange -1720 The range is not valid because it is impossible for a range to include the first and last objects that were specified; an example is a range in which the offset of the first object is greater than the offset of the last object errAEWrongNumberArgs -1721 The number of operands provided for the kAENOT
logical operator is not 1errAEAccessorNotFound -1723 There is no object accessor function for the specified object class and token descriptor type errAENoSuchLogical -1725 The logical operator in a logical descriptor record is not kAEAND
,kAEOR
, orkAENOT
errAEBadTestKey -1726 The descriptor record in a test key is neither a comparison descriptor record nor a logical descriptor record errAENotAnObjectSpec -1727 The objSpecifier
parameter ofAEResolve
is not an object specifier recorderrAENegativeCount -1729 An object-counting function returned a negative result errAEEmptyListContainer -1730 The container for an Apple event object is specified by an empty list AEResolve
also returns any result code returned by one of your application's object accessor functions or object callback functions. For example, an object accessor function can returnerrAENoSuchObject
(-1728) when it can't find an Apple event object, or it can return more specific result codes.If any object accessor function or object callback function returns a result code other than
noErr
orerrAEEventNotHandled
,AEResolve
immediately disposes of any existing tokens and returns. The result code it returns in this case is the result code returned by the object accessor function or the object callback function.SEE ALSO
For an overview of the wayAEResolve
works with object accessor functions, see "Resolving Object Specifier Records," which begins on page 6-4.