SAS/AF Catalog Entry Types |
RESOURCE entries (also referred to simply as resources) store a collection of classes that are used for building FRAME entries. You use the BUILD procedure's Resource Editor window to add classes to or remove classes from RESOURCE entries.
When you add a class to a RESOURCE entry, the class definition is copied from the corresponding CLASS entry into the RESOURCE entry. The RESOURCE entry stores a complete, static copy of its classes. If you change the name, location, description, or any of the properties of a class that is added to a resource, you must synchronize the resource to update the copy of the class in the RESOURCE entry. You use the SYNC command in the Resource Editor window (or the SYNC statement with a PROC BUILD statement) to synchronize a RESOURCE entry.
Note: If you open a class for editing from within the Resource Editor window, the resource is automatically synchronized when you save your changes to the class.
The BUILD procedure's Components window displays the classes that are available when you are building a FRAME entry. Classes can appear in the Components window even if they are not part of a resource, but you can collect a set of classes into a resource and then add the single resource to the Components window to make all the classes in the resource available for use in the FRAME entry. The Components window displays the RESOURCE entry's description as the name of the resource.
The RESOURCE entry stores the display status of each class. The display status determines whether the class appears in the Components window when the resource is added to that window. Visual classes that can be dropped onto a frame should have their status option set to Display. If you do not want the class to appear in the Components window, you can use the Toggle Display Status control in the Resource Editor window to turn off the display status. Although a resource should contain all the classes that an application uses, only those components that can be dropped onto a frame should be set to display in the Components window.
You can use resources to organize and maintain class libraries for developing SAS/AF applications. For example, you could use a personal RESOURCE entry to store classes that you develop, and a separate RESOURCE entry to store classes that are developed at your site, in addition to the standard RESOURCE entry that is provided with SAS/AF software (SASHELP.FSP.AFCOMPONENTS.RESOURCE).
Note: Although resources are helpful organizational aids, there are performance drawbacks to using multiple resources. If a FRAME entry has only one resource to load, the initialization stage is generally faster than when multiple resources must be loaded.
Whenever you create a new FRAME entry, a RESOURCE entry is associated with the FRAME entry. By default, the standard RESOURCE entry provided with SAS/AF software (SASHELP.FSP.AFCOMPONENTS.RESOURCE) is used. You can use the RESOURCE= statement with the PROC BUILD statement or the RESOURCE= option with the BUILD command to specify a different initial resource. Once the FRAME entry is created, the associated resource cannot be changed. The associated RESOURCE entry must be available any time you open the FRAME entry in the BUILD environment or execute the entry in the application window.
If the associated resource has an active Frame class, then the new FRAME entry is an instance of that class. When you add a subclass of the Frame class to the resource, you have the option of making it the active Frame class for the resource. A resource can contain multiple Frame classes, but only one can be active at a time. You can use the Active control in the Resource Editor window to select the active Frame class. If the associated resource has no active Frame class, the default Frame class (SASHELP.FSP.FRAME.CLASS) is used.
Refer to SAS Guide to Applications Development for an introduction to working with RESOURCE entries.
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.