Important: The information in this document is obsolete and should not be used for new development.
MyGetMarkToken
If your application supports marking, you must provide one mark token function. A mark token function returns a mark token.
FUNCTION MyGetMarkToken (containerToken: AEDesc; containerClass: DescType; VAR result: AEDesc): OSErr;
containerToken- The Apple event object that contains the elements to be marked with the mark token.
containerClass- The object class of the container that contains the objects to be marked.
result- Your mark token function should return a mark token in this parameter.
DESCRIPTION
To get a mark token, the Apple Event Manager calls your mark token function. Like other tokens, the mark token returned can be a descriptor record of any type; however, unlike other tokens, a mark token identifies the way your application will mark Apple event objects during the current session while resolving a single object specifier record that specifies the key formformTest.A mark token is valid until the Apple Event Manager either disposes of it (by calling
AEDisposeToken) or returns it as the result of theAEResolvefunction. If the final result of a call toAEResolveis a mark token, the Apple event objects currently marked for that mark token are those specified by the object specifier record passed toAEResolve, and your application can proceed to do whatever the Apple event has requested. Note that your application is responsible for disposing of a final mark token with a call toAEDisposeToken, just as for any other final token.If your application supports marking, it should also provide a token disposal function modeled after the token disposal function described on page 6-111. When the Apple Event Manager calls
AEDisposeTokento dispose of a mark token that is not the final result of a call toAEResolve, the subsequent call to your token disposal function lets you know that you can unmark the Apple event objects marked with that mark token. A call toAEDisposeDescto dispose of a mark token (which would occur if you did not provide a token disposal function) would go unnoticed.RESULT CODES
noErr 0 No error occurred errAEEventNotHandled -1708 The mark token function is unable to return a mark token; if the Apple Event Manager gets this result, it attempts to get a mark token by calling the equivalent system marking callback function SEE ALSO
For more information, see "Writing Marking Callback Functions," which begins on page 6-62.