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
Routines for Resolving and Creating Object Specifier Records / Setting Object Accessor Functions and Object Callback Functions


AESetObjectCallbacks

You can use the AESetObjectCallbacks 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 by AESetObjectCallbacks: 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 to AESetObjectCallbacks replaces any object callback functions installed by previous calls to AESetObjectCallbacks. You cannot use AESetObjectCallbacks 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 of NIL for the functions you don't want to replace.

RESULT CODES
noErr0No error occurred
paramErr-50The handler pointer is NIL or odd, or AEObjectInit was not called before this function
memFullErr-108There is not enough room in heap zone
errAENotASpecialFunction-1714The 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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996