Smalltalk User Guide : Setting up, customizing, and extending the system : Extending the system : Application behavior when starting and stopping the system
Application behavior when starting and stopping the system
The following class methods enable applications to perform actions at run time. They are executed when the system performs the associated system event. The default behavior for all applications and subapplications is to do nothing.
exiting
This method is sent during the image exiting sequence. It should be implemented by applications that must execute code before the image is exited
localize
This message is sent during the image startup sequence immediately after preStartUp, but before the system is initialized and the configuration file read. This ensures that an application's strings are properly localized early in the event that problems occur during the startup sequence, or in the event that they are required when startUp is sent to the application.
postExiting
This message is sent during the image exiting sequence immediately after exiting. This method is rarely needed; normally all exiting code goes in the exiting method.
 
preStartUp
This method should be implemented by applications that must execute code after the image is loaded, but before any of the applications in the image are started up. Code written in this method can be used to perform any work that must be performed only before the standard startUp messages are sent. This code must not depend on any other applications in the system (including the file and window systems). This method is rarely needed; normally all start up code goes in the startUp method.
 
relocalize
This message is sent during the image startup sequence and at other times also, to allow an application to react to a change of locale. This message is sent immediately after startUp. This method should ensure an application's strings are properly localized to the current locale.
restart
This method should be implemented by applications that run code after an image is restarted, which occurs when the image is saved. For example, any working files used by the system should be opened in this method.
 
saving
This method should be implemented by applications that need to run code before an image is saved.
shutDown
This method should be implemented by applications that need to run code before an image is shut down, which is necessary to exit to a shell or to save the image. Operations normally done in the shutDown method include closing open files, and restoring the current directory to the directory that contains the image.
startUp
This method should be implemented by applications that need to run code after an image is loaded. Code written in this method can initialize the image to a clean state before a user is given control.
 
Last modified date: 01/29/2015