Important: The information in this document is obsolete and should not be used for new development.
AGInstallCoachHandler
Use theAGInstallCoachHandler
function to install a coachmark handler.
OSErr AGInstallCoachHandler (CoachReplyProcPtr CoachReplyProc, long refCon, AGCoachRefNum *resultRefNum);
CoachReplyProc
- A pointer to your coachmark handler function. This application-defined function provides the location of the object to coachmark.
refCon
- An optional reference constant that your application can provide. Apple Guide passes this as a parameter to your coachmark handler.
resultRefNum
- A reference number. The
AGInstallCoachHandler
function returns, through this parameter, a number that refers to the coachmark handler.DESCRIPTION
TheAGInstallCoachHandler
function installs the coachmark handler and returns in theresultRefNum
parameter a reference to it. Once a coachmark handler is installed, Apple Guide calls it in response to any panels that use an object coach. (The object coach must be one that specifies your application as a target in the <Define Object Coach> command.)SPECIAL CONSIDERATIONS
Install only one coachmark handler for your application.Your application should always remove any coachmark handler (using
AGRemoveCoachHandler
) it has installed before quitting.RESULT CODES
noErr 0 No error kAGErrCannotInitCoach -2952 Unable to initialize coach handler SEE ALSO
For information on writing a coachmark handler, see "Providing Object Locations for Coachmarks" on page 9-38. For information on the <Define Object Coach> command, see the chapter "Guide Script Command Reference."