Progress
Programming
Handbook
Using GET–KEY–VALUE and PUT–KEY–VALUE
The GET–KEY–VALUE and PUT–KEY–VALUE statements allow you to read or write a specified value for any resource by accessing the registry or an initialization file. The registry consists of sections called keys and subkeys arranged in a hierarchy. Keys and subkeys contain value entries, each of which consists of a value name and value data. Initialization files, by contrast, consist of a single level of sections. Sections contain entries, each of which consists of a name, an equals sign (=), and a value.
For example, to retrieve the Windows definition for font 8 from the current environment, which might be the registry or an initialization file, you might enter this statement. It returns the initial environment definition for font 8 in the FontString variable.
To specify “Times New Roman” as the new definition for font 8 on Windows, you might enter this statement. It sets the
font8
parameter in the current environment.
Writing Portable Color and Font Definitions
To write portable color and font definitions directly from the current color and font tables, use the PUT–KEY–VALUE statement with the COLOR or FONT option. For example, if you allow the user to change color 8 during a session through the color common dialog (SYSTEM–DIALOG COLOR statement), you can save the new color definition in the current environment using this statement.
You can save all current color definitions from the color table using this statement.
For more information on these statements, see the Progress Language Reference .
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |