[Next] [Previous] [Up] [Top] [Contents] [Index]

Chapter 1. General PSYX information

1.7 Resources


Whenever possible, resources should be accessed by name, since resource name collisions among PSYXs are much less likely than resource number collisions. Since the Macintosh toolbox routines for opening dialogs and loading menus require number IDs, replacements for have been provided: OpenANamedDialog() and GetNamedMenu().

If some resources must be read by number, include a named `tag!' resource in the PSYX file's resource fork. The number of the `tag!' resource can be anything, but the name should be the same as the PSYX's four-character ID. Then, to get a resource by number, first call SetUpResFile() (passing in your PSYX's ID), then get the numbered resource(s), and then call TakeDownResFile(). Calls to SetUpResFile() and TakeDownResFile() cannot be nested.

Menu resources may be assigned resource (and menu IDs) only in the ranges 31-50 and 700-720. Menus should only be inserted into the menu list while the dialog is frontmost, since other PSYXs may use the same menu IDs. If, for some reason, your PSYX needs a menu to stay installed while another dialog is active, you should register an ID with PsyScope Support.


PSYX Programmer's Manual - 24 AUG 95
[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with CERN WebMaker