Class variables
You can unload a collection of class variables either with their current values or with new values that you set. If you set new values, ENVY/App overwrites the values existing in the image into which the variables are being loaded.
You use the method dumpClassVariable:in: to unload class variables with their current values, and dumpClassVariable:withValue:in: to unload them with new values.
Two examples illustrate how to unload class variables
Prior to executing the code in any of these examples, load packaging instructions and create an instance of EaComponentMapManager called ComponentMaps by executing Step 1 of Example: Unloading an application and its subapplications.
 
Example: Unloading a class variable with its current value
Suppose a class named Alpha has the following definition:
Object subclass: #Alpha
classInstanceVariableNames: 'a b'
instanceVariableNames: 'c d'
classVariableNames: 'E F'
poolDictionaries: 'G'
To unload the class variable "E" with its current value into a file named alpha.ic, you use statements in the following code fragment:
"Step 2: Unload the class variable E into alpha.ic."
| result |
(result := ApplicationDumper new)
...
dumpClassVariable: 'E' in: Alpha;
...
dumpIntoFileNamed: 'alpha.ic' path: '.' using: ComponentMaps.
...
Example: Unloading a class variable with a specific value
Suppose, for the class Alpha defined in Example: Unloading a class variable with its current value, you want to unload the class variable "E" with a current value of 100 into a file named alpha.ic. To do so, you use the following code fragment:
"Step 2: Unload the class variable E having a value 100 into alpha.ic."
| result |
(result := ApplicationDumper new)
...
dumpClassVariable: 'E' withValue: 100 in: Alpha;
...
dumpIntoFileNamed: 'alpha.ic' path: '.' using: ComponentMaps.
...
Last modified date: 01/29/2015