System Internals

$Revision: 1.1.1.1.8.1 $

*system*
Configuration
APP
System Start Up and Shut Down
dumplisp

*system*

The goal for Common Graphics and the Development Environment is to have a single global variable called *system*. The value of this global variable is an instance of the system or devel::development-system class.

All slots and other global information, are added as properties of *system*. That way, you can assess and change anything about the global state using the inspector.

Configuration

The system object is a hierarchical object. Stored in a slot of the system object is a configuration object. The configuration object is used to store all options that will be saved and restored in the preferences file (prefs.cl in the Allegro directory). Not all configuration options are displayed in the Options dialog (displayed by Tools | Options) but the commonly used ones are offered.

Like the system and devel::development-system classes, there are configuration and devel::development-configuration classes. The configuration class is used for Common Graphics and some Common Lisp configuration options. The devel::development-configuration is used for the Development Environment configuration options.

All slots and configuration information should also be properties of the configuration class so that you can assess and change them using the inspector. Only properties are saved to the preferences file.

APP

The app slot of the system object holds an instance of the app class. The app object holds Windows application information such as current program, command line options, hinst, wndow-proc-address, etc. This object is analogous to the app object offered by Visual Basic.

System Start Up and Shut Down

To start Common Graphics or the Development Environment, run the function start-ide. System start up is described in About IDE startup in cgide.htm.

Exiting the system is done as follows:

  1. (In development environment only) Each item in (exit-tests *system*) , which is a list of functions (see exit-tests) is funcalled. The exit is aborted if any of the functions returns false.
  2. Each item is (session-exit-functions *system*) (again, a list of functions (see session-exit-functions) is called.
  3. Each variable listed in (session-variables *system*) is set to nil (see session-variables).

dumplisp

After a dumplisp, the *system* variable remains bound. That way, all global state and configuration is saved in the new dxl. When the system is started after a dumplisp, cg::reinitialize-system is called to clean up the values stored in *system*.

Copyright (C) 1998-2000, Franz Inc., Berkeley, CA. All Rights Reserved.