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: Apple Guide Complete / Part 3 - Integrating Guide Files
Chapter 9 - Apple Guide API / Installing and Removing Coachmark Handlers
/


AGInstallCoachHandler

Use the AGInstallCoachHandler 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
The AGInstallCoachHandler function installs the coachmark handler and returns in the resultRefNum 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
noErr0No error
kAGErrCannotInitCoach-2952Unable 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."


Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 JUL 1996