EmSystemConfiguration
Each VA Smalltalk system includes a single instance of the class EmSystemConfiguration, accessed through the global variable System. System serves two functions: It provides access to useful information about how the image is configured, and it also accepts messages to save the image and shut down the system.
The current system configuration can be obtained by sending System the message configuredSubsystems. This returns a dictionary showing which variant of each VA Smalltalk subsystem is configured, keyed by the subsystem name. The keys must include one of the following strings: 'CLDT,' 'CLIM,' 'CPM,' 'CFS,' 'CG,' 'CW,' or 'CP.'
Typical values for each subsystem key are shown in the following table. This table might not be complete. Other values might be supported in subsequent releases.
Table 6. Typical values for subsystem keys
| |
'CLDT' | 'ES' |
'CLIM' | 'ES' |
'CPM' | 'ES' |
'CFS' | 'POSIX’, 'WIN32s' |
'CG' | 'X’, 'WIN32s' |
'CW' | 'MOTIF’, 'WIN32s' |
'CP' | 'WIN32s' |
If a platform is not supported, the value for its key is 'UNSUPPORTED'. If any subsystem is not configured, the value for its key is nil. This might be the case, for example, for a packaged Smalltalk system that has no file subsystem loaded. The message setSubsystemType:to: can be used to set or change the system configuration. The first parameter is the name of the subsystem, which must be one of the subsystem key strings listed above. The second parameter is one of the allowed values for the subsystem, or nil, in which case the image has no configuration for that subsystem.
It is also possible to use the message subsystemType: to make a specific query regarding the configuration of a particular subsystem. The parameter is once again one of the subsystem names, and the return value is one of the allowed values or nil.
Other accessing messages supported are copyright and vmType. The message copyright answers the system's copyright message, while vmType answers the virtual machine type for the system.
As mentioned, EmSystemConfiguration also provides support for exiting and saving the image. The message exit ends the Smalltalk system. Sending saveImage causes a snapshot to be taken of the current state of the image and writes it to disk. The exact mechanisms used, such as dialogs invoked, options supported, and name of the saved file, are platform-specific. When the Smalltalk system is next invoked, the most recent image snapshot is restored.
Last modified date: 05/12/2020