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 / Opening and Closing Guide Files
/


AGOpenWithView

Use the AGOpenWithView function to open a guide file and specify its initial active list. You can use this function to open a guide file that uses a Full Access window or Single List access window.

AGErr AGOpenWithView (FSSpec *fileSpec, UInt32 flags,
                       Handle mixinControl,
                       short viewNum,
                       AGRefNum *resultRefNum);
fileSpec
A pointer to the file system specification record for the guide file you wish to open. Specify NIL to open the first guide file of type Help that is available to the application.
flags
Reserved. Specify 0 in this parameter.
mixinControl
Reserved. Specify NIL in this parameter.
viewNum
A value that indicates which list to display. You can use these constants to specify which list should be initially active:
            enum {
               kAGViewFullHowdy     = 1,  /*full howdy*/
               kAGViewTopicAreas    = 2,  /*Topic Area*/
               kAGViewIndex         = 3,  /*Index*/
               kAGViewLookFor       = 4,  /*Look For*/
               kAGViewSingleHowdy   = 5,  /*Single List *
                                          /* howdy*/
               kAGViewSingleTopics  = 6   /*Single List */
                                          /* topics*/
            };
resultRefNum
An address through which AGOpenWithView returns a reference number for the guide file specified in the fileSpec parameter. You use this reference number to refer to the guide file in other Apple Guide functions.
DESCRIPTION
The AGOpenWithView function opens the guide file specified in the fileSpec parameter, and displays the active list specified in the viewNum parameter. If the application portion of Apple Guide is not in memory, AGOpenWithView calls AGStart to start up Apple Guide before it opens the specified guide file.

RESULT CODES
noErr0No error
kAGErrCannotOpenAliasFile-2954Unable to open alias
kAGErrNoAliasResource-2955Unable to open resource alias
kAGErrDatabaseNotAvailable-2956Guide file is not available
kAGErrInsufficientMemory-2962Not enough memory

Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 JUL 1996