Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Interapplication Communication /
Chapter 6 - Resolving and Creating Object Specifier Records / Reference to Resolving and Creating Object Specifier Records
Application-Defined Routines / Object Callback Functions


MyAdjustMarks

If your application supports marking, you must provide one mark-adjusting function. A mark-adjusting function adjusts the marks made with the current mark token.

FUNCTION MyAdjustMarks (newStart, newStop: LongInt; 
                        markToken: AEDesc): OSErr;
newStart
The mark count value (provided when the MyMark callback routine was called to mark the object) for the first object in the new set of marked objects.
newStop
The mark count value (provided when the MyMark callback routine was called to mark the object) for the last object in the new set of marked objects.
markToken
The mark token for the marked objects.
DESCRIPTION
When the Apple Event Manager needs to identify either a range of elements or the absolute position of an element in a group of Apple event objects that pass a test, it can use your application's mark-adjusting function to unmark objects previously marked by a call to your marking function. For example, suppose an object specifier record specifies "any row in the table 'MyCustomers' for which the City column is 'San Francisco.'" The Apple Event Manager first uses the appropriate object accessor function to locate all the rows in the table for which the City column is "San Francisco" and calls the application's marking function repeatedly to mark them. It then generates a random number between 1 and the number of rows it found that passed the test and calls the application's mark-adjusting function to unmark all the rows whose mark count does not match the randomly generated number. If the randomly chosen row has a mark count value of 5, the Apple Event Manager passes the value 5 to the mark-adjusting function in both the newStart parameter and the newStop parameter, and passes the current mark token in the markToken parameter.

When the Apple Event Manager calls your MyAdjustMarks function, your application must dispose of any data structures that it created to mark the previously marked objects.

RESULT CODES
noErr0No error occurred
errAEEventNotHandled-1708The MyAdjustMarks function is unable to adjust the marks as requested; if the Apple Event Manager gets this result, it attempts to adjust the marks by calling the equivalent system mark-adjusting function
SEE ALSO
For more information, see "Writing Marking Callback Functions" on page 6-62.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996