User's Guide

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.

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 1: 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.
   ...


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]