We’re still here for you! Read about Cincom’s response to COVID-19 here.
Largest Provider of Commercial Smalltalk
Cincom is one of the largest commercial providers of Smalltalk, with twice as many partners and customers than other commercial providers.

Tom Nies

Setting a Startup Controller with the Runtime Packager in Cincom® ObjectStudio® 8.3

This article describes a new feature that’s being introduced in the ObjectStudio 8.3 Runtime Packager and compares it to ObjectStudio 8.2.1 and earlier versions.

ObjectStudio 8.2.1 and earlier versions of the ObjectStudio Runtime Packager ignored one component of classic ObjectStudio—the global variable “Application.” This raised a few issues in the runtime image since some ObjectStudio methods use that global variable.

In classic ObjectStudio’s “Program Generator,” the developer had to select the main Controller of the application from a list. The global variable Application was set to point to that Controller.

In ObjectStudio 8.3, we re-introduced the same concept in the runtime packager. In the ObjectStudio User’s Guide, (Chapter 8, Application Delivery) the runtime packager process details are explained, while here, only the startup Controller selection and its related issues are described.

When you create the runtime image, the first step is “Clean up image.” In the second step, “Set common options,” you can set the startup Controller along with the runtime image name and more. See the “Runtime Packager Common Options” screen shot.

Runtime Packager Common Options
Runtime Packager Common Options

The developer needs to select the startup Controller first. For ease of use, a selection button is provided at the right side of the entry field ( ). When you click this button, it lists all ObjectStudio Controller instances that are created by the developers.

Select a Controller Instance
Select a Controller Instance

From the list, select the desired Controller instance name as the startup Controller. Follow the other steps that are defined in the document.

Note that the Controllers are not added to the list of possibilities if they (or their class) can understand the message #isRemovableByProgramGenerator and answer true to that message. (See the methods RuntimeBuilderOStudioOptionsEditor>>applicationControllers and RuntimeBuilderOStudioOptionsEditor>>isRemovableByProgramGenerator:). This filtering is done as a proactive step so that the developer does not select a Controller instance that can be removed by the runtime image-stripping process.

When the startup Controller is selected, the “Startup class” and “Controller creation method” fields are filled in automatically. The startup class is the class name of the startup Controller, and the “Controller creation method” is set to the default, #createInstanceName:. If the Startup controller instance is created using a different method, then the developer needs to change the method. The selection button (  ) at the right side of the entry field lists all class methods that are understood by the Startup class. Note that the “Startup Controller class” and “Controller creation method” are typically not used in the ObjectStudio runtime image, but they should be set to satisfy RuntimePackager validation rules and so that they can be used in case the global Application is nil.

Note that when the runtime (deployed) image is opened, this selected startup Controller instance will be opened. In the runtime image, this Controller instance is maintained as the Application (equivalent to the WPENFIN in the development image).

When the saved runtime image is started, the #open message is sent to Application (the startup Controller).

In earlier versions, the developer needed to select “Startup class,” “Startup method” and the runtime image name in this page. But from ObjectStudio 8.3, developers need to first select the Startup controller instance name and then the runtime image name. This screenshot shows the difference between the Runtime Packager of Cincom® VisualWorks® (or ObjectStudio 8.2.1 and earlier versions) and the ObjectStudio 8.3 version.

VisualWorks RuntimePackager and ObjectStudio 8.3 RuntimePackager
VisualWorks RuntimePackager ( first ) and ObjectStudio 8.3 RuntimePackager ( second )

This change will help when using deployment images generated by the Runtime Packager that use code that references the global variable Application (opening ModalDialogBoxes would be an example of that) and we expect it will make things simpler and easier for customers who are migrating applications that have been developed in older versions of ObjectStudio.