User's Guide

Applications

To unload an individual application or any collection of applications into an image component file or a byte array, you use the methods dumpApplications: or dumpApplicationsWithSubApps: contained in the class ApplicationDumper.

If you want to unload an application and its subapplications separately using dumpApplications:, ensure that a subapplication does not contain a defined class that is extended in the parent application. In such cases, you cannot then load the parent application or its subapplications. You cannot load the parent application because, upon load, the defined class is not visible to the extended class. You cannot load the subapplications because the parent cannot load; a parent application must load before its subapplications. To avoid such problems, place defined classes in parent applications or extended classes in subapplications.

Example: Unloading an application and its subapplication

Suppose you want to unload the application DevelopChooser and its subapplication DevelopStopwatchApp into a file, reload them, and check for errors. To unload the components, you create an instance of EaComponentMapManager and then use the methods dumpApplicationsWithSubApps: and dumpIntoFileNamed:path:using:.

"Step 1: Define an instance to hold the component map."
 
Smalltalk at: #ComponentMaps put:
    EaComponentMapManager new loadImageMaps;
    yourself.
 
 
"Step 2: Unload the application and subapplication into develop.ic."
 
| result |
result := ApplicationDumper new.
result
    dumpApplicationsWithSubApps: (Array with: DevelopChooser);
    dumpIntoFileNamed: 'develop.ic' path: '.' using: ComponentMaps.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]