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
/


AGOpenWithSearch

Use the AGOpenWithSearch function to open a guide file and immediately start a search on a specified search phrase. You can use this function to open a guide file that uses a Full Access window.

AGErr AGOpenWithSearch(FSSpec *fileSpec, UInt32 flags,
                       Handle mixinControl,
                       ConstStr255Param searchString,
                       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.
searchString
The search phrase to place in the search phrase entry box. When the guide file (specified in the fileSpec parameter) opens up, Apple Guide searches on this phrase.
resultRefNum
An address through which AGOpenWithSearch 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 AGOpenWithSearch function opens the guide file, specified in the fileSpec parameter, in a Full Access window with Look For active. After the guide file opens, Apple Guide immediately starts to search the open guide file for any occurrences of the search phrase specified in the searchString parameter. If the application portion of Apple Guide is not in memory, AGOpenWithSearch first calls the AGStart function 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