Important: The information in this document is obsolete and should not be used for new development.
MyDisposeToken
If your application requires more than a call to theAEDisposeDesc
function to dispose of a token, or if it supports marking callback functions, you must provide one token disposal function. A token disposal function disposes of a specified token.
FUNCTION MyDisposeToken (VAR unneededToken: AEDesc): OSErr;
unneededToken
- The token to dispose of.
DESCRIPTION
The Apple Event Manager calls your token disposal function whenever it needs to dispose of a token. It also calls your disposal function when your application calls theAEDisposeToken
function. If your application does not provide a token disposal function, the Apple Event Manager callsAEDisposeDesc
instead.Your token disposal function must be able to dispose of all of the token types used by your application.
If your application supports marking, a call to
MyDisposeToken
to dispose of a mark token lets your application know that it can unmark the objects marked with that mark token.SPECIAL CONSIDERATIONS
If the Apple Event Manager receives the result code errAEEventNotHandled after calling a token disposal function, it attempts to dispose of the token by some other method, such as calling an equivalent system token disposal function if one is available or, if that fails, by callingAEDisposeDesc
. Thus, a token disposal function that can't dispose of a token should return errAEEventNotHandled. This allows the Apple Event Manager to try other token disposal functions that may be available.RESULT CODES
noErr 0 No error occurred errAEEventNotHandled -1708 The token disposal function is unable to dispose of the token