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.
1. Load configuration maps that contain IC instructions. You generally will need the maps ENVY/Packager IC Instructions and VA Smalltalk IC Instructions. The Server Smalltalk (SST) components also have IC instructions.
2. 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 Programmer’s Reference Namespace pragmas.
3. In the System Transcript window, select NLS > Porting from the Tools menu to convert any old-style NLS pool dictionary initializations to _PRAGMA_ definitions. For more information, see Programmer’s Reference Namespace pragmas.
4. If you will be translating strings in your applications, enable for translation any VA Smalltalk visual parts, pool dictionaries, and indexed messages. This step involves, in part, building a message and pool repository (.mpr) file. For more information, refer to the chapter on national language support in the VA Smalltalk User's Guide.
5. 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:
7. Ensure your application prerequisites are correct. From the Tools menu of the System Transcript window, select Query > Out of Scope References to find problems.
9. Remove all references to global variables in the unmanaged namespace. From the Tools menu of the System Transcript window, select Query > Globals in Unmanaged Namespace to find problems.
|