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: More Macintosh Toolbox /
Chapter 1 - Resource Manager


About the Resource Manager

The Resource Manager provides routines that allow your application (and system software) to create, delete, open, read, modify, and write resources; get information about them; and alter the Resource Manager's search path.

Most Macintosh applications commonly read data from resources either indirectly, by calling other system software routines (such as Menu Manager routines) that in turn call the Resource Manager, or directly, by calling Resource Manager routines. At any time during your application's execution, at least two resource forks from which it can read information are likely to be open: the System file's resource fork and your application's resource fork.

As previously described, system software opens the System file's resource fork at startup and your application's resource fork at application launch. Your application is likely to open the resource forks of several other files at various times while it is running. For example, if your application saves the last position and size of a window (as determined by the user), you can use Resource Manager routines to write this information to an application-defined resource in the document file's resource fork. The next time the user opens the document, your application can use the Resource Manager to read the information saved in this resource and position the document accordingly.

You can store the user's general preferences, such as the default font or paper size, in your application's preferences file. You store a preferences file in the Preferences folder of the System Folder. The name of an application's preferences file typically consists of the name of the application followed by the word "Preferences." If your application can be shared by multiple users, you can use the Resource Manager to create a separate preferences file for each user.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996