User's Guide
This section lists the steps you perform to get your applications ready to
be packaged as one or more ICs. If you skip any steps, you will either
get an error during the creation of the IC or the resulting packaged IC will
not perform as you had intended. Also, this section identifies the
symptoms of many common problems with the generation and use of ICs. Be
sure to refer to Troubleshooting if you get an error during packaging or your ICs don't
perform as expected.
- Load configuration maps that contain IC instructions. You generally
will need the maps ENVY/Packager IC Instructions and VisualAge
IC Instructions. The Server Smalltalk (SST) component of the
VisualAge Smalltalk Server Workbench and VisualAge Smalltalk Persistence
separately orderable features also have IC instructions for those
features.
- Replace your global and pool variable definitions with _PRAGMA_
statements.
For proper declaration and use of pool dictionaries and their contained
variables and constants, replace toBeLoadedCode setup of pool
related data with _PRAGMA_ methods on the Application or
SubApplication class. Search your image for out-of-scope
global references and potential application prerequisite problems prior to
packaging any application, both for reduced runtime and for ICs. For
more information, see Namespace support.
- In the System Transcript window, select NLS > Porting
from the Tools menu to convert existing NLS pool dictionary
initialization to _PRAGMA_ definitions. For more
information, see Namespace support.
- If you will be translating strings in your applications, enable for
translation any VisualAge visual parts, pool dictionaries, and indexed
messages. This steps involves, in part, building a message and pool
repository (.mpr) file. For more information, refer
to the chapter on national language support in the VisualAge Smalltalk
User's Guide.
- Check and correct loaded and initializeAfterLoad
methods which reference objects that are not initialized until startup time,
for example the ColorDatabase class variable in the
CgServer class. All loaded code is run for an IC
before any of the startUp code associated with the IC is
run. This means that loaded code for a particular
Application within an IC cannot assume that the startUp code for
any of its prerequisite Applications has been run. Protect code in
loaded and initializeAfterLoad that references objects
created during startup by surrounding it as follows:
System imageStarted ifTrue: [self primStartUp].
Your startup method then includes the following code:
self primStartUp.
Finally, there is the common method:
primStartUp
"Do the stuff that depends on the image being started."
- Refactor configuration maps into edit-time and runtime maps.
Although IC packaging is driven from collections of applications, not from
configuration maps, it is easier to manage your code and packaging if ICs map
to configuration maps.
- Ensure your application prerequisites are correct. From the
Tools menu of the System Transcript window, select Query
> Out of Scope References to find problems. For more
information, see Namespace support.
- If you are packaging new classes, version and release the classes and
applications before you create ICs. Otherwise, the names of the
applications and classes are included in the unmanaged namespace.
- Remove all references to global variables in the unmanaged
namespace. You can verify that these global variable references have
been removed by inspecting the following:
System image globalNamespace unmanagedNamespace
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]