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: Macintosh Toolbox Essentials /
Chapter 7 - Finder Interface / Using the Finder Interface


Providing Version Resources

You can use version ('vers') resources to record version information for your application. If the user opens the Views control panel, clicks the Show version box, and then chooses any command from the View menu other than by Icon or by Small Icon, filenames and their version numbers from the version resource appear in the active Finder window. The Finder also displays version information when the user selects your application and chooses Get Info from the File menu.

The version resource allows you to store a version number, a version message, and a region code. (Because the Get Info command's information window already displays
the name of your application, the version message should not include the name of
your application.) You can use version resources to assign version information to an individual file and, if it is a part of a larger collection of files, to the entire superset of files. The version resource with a resource ID number of 1 specifies the version of the
file; the version resource with a resource ID number of 2 specifies the version of the set
of files.

Each version resource should contain these elements:

Listing 7-9 illustrates the version resources for a graphics application and for the document-processing system of which it is a part. Notice that the paint program is version 1.0 while the set of files that compose the entire document-processing system
is version 2.0.

Listing 7-9 Rez input for a pair of version resources

resource 'vers' (1, purgeable) {
   0x01, 0x00, release, 0x00, verUS,
   "1.0",
   "1.0 (US), © My Company, Inc. 1992"
};
resource 'vers' (2, purgeable) {
   0x02, 0x00, release, 0x00, verUS,
   "2.0",
   "(for SurfWriter 3.0)"
};
Figure 7-13 illustrates how the Finder displays the information from these resources in its information window.

You can store version resources in any kind of file, not just an application. If your application does not contain a version resource with a resource ID number of 1, the Finder displays the string from your signature resource as the version information
in the information window for your application.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996