Application Developer Guide > Building VDA Tools > Resources and Strings in PV-WAVE Applications
  

Resources and Strings in PV-WAVE Applications
The resource handling routines and the corresponding architecture levels are shown in Resource Handling Routines.
 
Table 4-5: Resource Handling Routines
Resource and String Routines
Architecture Level
STRLOOKUP
PV‑WAVE
WAVE Widgets, Widget Toolbox
VDA Tools Manager
VDA Tools Utilities
VDA Tools Utilities
The STRLOOKUP and WtResource routines form the foundation for the VDA Tool Utility functions (TmGetMessage, WoLoadResources, and WoLoadStrings). The lower-level routines require specific path and file names to access the resource and string files. The higher-level functions can be used with or without a specified pathname.
In addition to being able to use more than one resource file in a given application, you can also access two types of resource files: widgets (object-related), and strings (object-less).
Widget Resource Files
Widget resource files are distinguished by the *.ad filename extension. These files allow you to customize the appearance and behavior of parent and compound widgets created using WAVE Widget routines. This custom naming feature improves the maintainability of GUI applications.
The widget initialization routines WwInit and WtInit allow you to specify a Resource keyword. This keyword specifies a resource file to load. If this keyword is not used, PV‑WAVE looks for the following file by default:
(UNIX) $WAVE_DIR/bin/Wave.ad
Note that the Wave.ad file is not distributed with PV‑WAVE. You must supply this file if you would like PV‑WAVE to load it.
You can load resources at any time after calling WtInit or WwInit. For WAVE Widgets applications, the routine WwResource is used to load, add, or save additional resources. VDA Tools use the utility routine, WoLoadResources procedure, to load resource files. Prior to loading the resource file, WoLoadResources searches directory paths to find the resource file to load.
String Files
String resource files contain error messages and other text strings, and are recognized by their .ads filename extension. The capability to specify and access multiple object-less resources allows you to customize messages and other text used in your application, including internationalization of your applications.
String files may be loaded at any time in a PV-WAVE session, since the STRLOOKUP function doesn’t require the Wave Widgets environment to be initialized. Once a string file has been loaded into the string database,
STRLOOKUP may be used to extract values.
VDA Tools are designed to need only the TmGetMessage function for their string operations. Since the string file is loaded (if necessary) prior to querying the database, the filename is specified in each call to TmGetMessage. Internally, TmGetMessage uses the WoLoadStrings procedure to load the string file.

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.