Associations are removed for variables previously declared, but no longer needed. Existing nonassignable variables are initialized to match the valueExpression: in the declaration. Existing assignable variables are not reinitialized. This ensures that the state of a running application is preserved.An application's namespace is automatically rebuilt when a class, subapplication, application, or configuration map is loaded, unloaded, or reloaded. It is also possible to manually rebuild application namespaces by selecting Make Consistent from the Applications menu of an Application Manager with the desired applications selected. This operation fails if there are errors in declarations or name clashes between declarations. If the operation fails, the namespaces are not rebuilt; they are the same as before the operation was initiated.On loading or reloading, the rebuilding of an application's namespace is done after its toBeLoadedCode expression is executed, but before any methods are compiled. Typical toBeLoadedCode directly adds global variables and pools to the Smalltalk dictionary. If executed in an image in which there are no declarations for these application variables and pools, the bindings are created in the unmanaged namespace. Processing declarations moves associations of the same name from the unmanaged namespace to the managed namespace. Subsequent execution of toBeLoadedCode operates on the binding in the managed namespace, allowing smooth migration away from toBeLoadedCode.
|