Adding message boxes using the NLS Workspace - Pool Dictionaries window
There are times when you may want to use pool dictionaries instead of indexed messages. Pool dictionaries contain strings that are accessible by name. Indexed messages, on the other hand, are only accessible through methods that must access the file system.
You should use pool dictionaries instead of indexed messages if:
• String retrieval time is important. Getting a string from a pool dictionary is almost instantaneous. Retrieving an indexed message from a file can take 1/10 of a second or longer.
• Memory usage is not a factor. Indexed messages are read in as needed and only a small number of them are kept around in a cache. Every string in a pool dictionary is loaded into memory from the beginning.
For example, to retrieve an indexed message, your code must access an integer, shown here as MyMsgIndex:
aString := (self getMRI: MyMsgIndex group: 'MyGroupName') string.
To retrieve an entry in a pool dictionary, your code accesses the string stored in a pool dictionary, shown here as MyString:
aString := MyString.
The steps you complete to define and display the messages stored in pool dictionaries are similar to those for indexed messages:
1. Add message text to a pool dictionary in an application edition by evaluating a script. This creates a PRAGMA method in your application, or updates it if one exists, and adds the NLS information to the application edition in the library.
Adding messages to a pool dictionary describes what you evaluate.
3. Make sure your image is synchronized with the new
.mpr file. Select
NLS > Rebind Image Strings from the
Tools menu of the Transcript. (See
Binding message strings.)
4. Version and release your changed application.
Unlike indexed messages, you do not need to explicitly define your pool dictionary before adding strings.
Only one application can define a pool dictionary and its strings. However, subapplications can add strings to a pool dictionary owned by their root application.
Last modified date: 01/29/2015