Defines a pointer to an object marking callback function. Your object-marking function marks a specific Apple event object.
- macOS 10.0+
- Mac Catalyst 13.0+
- Core Services
A pointer to the mark token used to mark the Apple event object. See
The number of times your
Myfunction has been called for the current mark token (that is, the number of Apple event objects that have so far passed the test, including the element to be marked).
A result code. See Result Codes. Your object marking function should return
no if it successfully marks the Apple event object and
err if it fails to mark the object. When the Apple Event Manager gets an error result of
err after calling an object marking function, it attempts to get mark the object by calling the equivalent system object marking function.
To mark an Apple event object using the current mark token, the Apple Event Manager calls the object-marking function provided by your application. In addition to marking the specified object, your
My function should record the mark count for each object that it marks. The mark count recorded for each marked object allows your application to determine which of a set of marked tokens pass a test, as described in the Discussion section for the
To provide a pointer to your mark callback function, you create a universal procedure pointer (UPP) of type
OSLMark, using the function
New. You can do so with code like the following:
If you wish to call your mark callback function directly, you can use the
After you are finished with your mark callback function, you can dispose of the UPP with the
Dispose function. However, if you will use the same mark function in subsequent calls to the function
AESet or the function
AEInstall, you can reuse the same UPP, rather than dispose of it and later create a new UPP.