develop-18 9406 June 1994
From the originals
13 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
PDF page 12
With the AGFile library, you can count and find guide databases of specific file and database types. Once you’ve found a database, you can get information about it. For example, the following code counts the number of main guide database files (those that aren’t mix-in files) of type kAGFileDBTypeHelp in a specified volume and directory: AGFileCountType guideFileCount; AGFileDBType databaseType=kAGFileDBTypeHelp; Boolean wantMixin=false; guideFileCount = AGFileGetDBCount(vRefNum, dirID, databaseType, wantMixin); You can get the FSSpec for a particular type of Apple Guide database file in a specified volume and directory as follows: AGFileCountType guideFileCount; AGFileDBType databaseType=kAGFileDBTypeOther; Boolean wantMixin=false; short dbIndex=1; FSSpec dbSpec; err = AGFileGetIndDB(vRefNum, dirID, databaseType, wantMixin, dbIndex, &dbSpec); GIVING USERS HELP WITH APPLE GUIDE 11 Apple Guide database files provide the content of the help that your application gives users. These files can be of the following two types: • kAGFileMain: Main or normal type of Apple Guide database file • kAGFileMixin: Mix-in database file, which modifies a main database file with updates and additions at run time Files of both types have a creator of kAGCreator, which is 'reno', and are further subdivided by database type according to the type of help information they contain. The database type is stored as part of the database content and determines where the file is represented in the Help menu, as indicated in Figure 2. Apple Guide supports multiple guide database files but only one of each type, except for kAGFileDBTypeOther. You can have multiple kAGFileDBTypeOther files; they’re added at the end of the Help menu, ordered by filename. All Apple Guide database files located in the same folder as your application will be represented in the Help menu. (Note that aliases will work as well as database files themselves, but that folders nested within your application’s folder will not be searched.) If you don’t want a guide database represented in the Help menu, you should separate the guide database from the application. In this case, you must provide a mechanism in your application to start up Apple Guide with that database, since the user can’t do it from the Help menu. The section “Starting Up Apple Guide” tells all about this. Databases can also have your creator and type, allowing you to use your own document icons. Databases identified this way won’t show up on the Help menu and must be opened from your application. ABOUT APPLE GUIDE DATABASE FILES Figure 2. Menu items identified by database type kAGFileDBTypeAbout kAGFileDBTypeHelp kAGFileDBTypeShortcuts kAGFileDBTypeTutorial kAGFileDBTypeOther
- Languages
- English