Important: The information in this document is obsolete and should not be used for new development.
AESetObjectCallbacks
You can use theAESetObjectCallbacks
function to specify the object callback functions to be called for your application.
FUNCTION AESetObjectCallbacks (myCompareProc, myCountProc, myDisposeTokenProc, myGetMarkTokenProc, myMarkProc, myAdjustMarksProc, myGetErrDescProc: ProcPtr): OSErr;
myCompareProc
- Either a pointer to the object-comparison function provided by your application or
NIL
if no function is provided.myCountProc
- Either a pointer to the object-counting function provided by your application or
NIL
if no function is provided.myDisposeTokenProc
- Either a pointer to the token disposal function provided by your application or
NIL
if no function is provided.myGetMarkTokenProc
- Either a pointer to the function for returning a mark token provided by your application or
NIL
if no function is provided.myMarkProc
- Either a pointer to the object-marking function provided by your application or
NIL
if no function is provided.myAdjustMarksProc
- Either a pointer to the mark-adjusting function provided by your application or
NIL
if no function is provided.myGetErrDescProc
- Either a pointer to the error callback function provided by your application or
NIL
if no function is provided.DESCRIPTION
Your application can provide only one each of the object callback functions specified byAESetObjectCallbacks
: one object-comparison function, one object-counting function, and so on. As a result, each of these callback functions must perform the requested task (comparing, counting, and so on) for all the object classes that your application supports. In contrast, your application may provide many different object accessor functions if necessary, depending on the object classes and token types your application supports.To replace object callback routines that have been previously installed, you can make another call to
AESetObjectCallbacks
. Each additional call toAESetObjectCallbacks
replaces any object callback functions installed by previous calls toAESetObjectCallbacks
. You cannot useAESetObjectCallbacks
to replace system object callback routines or object accessor functions. Only those routines you specify are replaced; to avoid replacing existing callback functions, specify a value ofNIL
for the functions you don't want to replace.RESULT CODES
noErr 0 No error occurred paramErr -50 The handler pointer is NIL
or odd, orAEObjectInit
was not called before this functionmemFullErr -108 There is not enough room in heap zone errAENotASpecialFunction -1714 The keyword is not valid for a special function SEE ALSO
For information about writing object callback functions, see "Application-Defined Routines," which begins on page 6-107.To install system object callback functions, use the
AEInstallSpecialHandler
function described on page 4-96.