Shared pool variables
You can unload a collection of shared pool variables either with their current values or with values that you set.
You use the method dumpSharedVariable:in: to unload shared pool variables with their current values, and dumpSharedVariable:withValue:in: to unload them with new values. If you set new values, ENVY/App overwrites the values existing in the image into which the variables are being loaded.
Prior to executing the code in this example, 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 shared pool variables
Suppose a class named Alpha has the following definition:
Object subclass: #Alpha
classInstanceVariableNames: 'a b'
instanceVariableNames: 'c d'
classVariableNames: 'E F'
poolDictionaries: 'G'
If the defined shared pool variable "G" contains the keys "One" and "Two," to unload the variable "One" with its current value and the variable "Two" with a value of 1000 into a file named both.ic, you use statements in the following code fragment:
"Step 2: Unload the shared pool variables One and Two into both.ic."
| result |
(result := ApplicationDumper new)
...
dumpSharedVariable: 'One' in: 'G';
dumpSharedVariable: 'Two' withValue: 1000 in: 'G';
...
dumpIntoFileNamed: 'both.ic' path: '.' using: ComponentMaps.
...
Last modified date: 01/29/2015