Ultra Light Client Guide and Reference


Opening new ULC views

The following paragraphs refer to issues concerning SST process management. You can ignore this section if either of the following is true:

However, if the code that opens the view is part of the application's business logic, you have to be more careful. For more information about SST process management, read ULC and Server Smalltalk.

Registering the start-up view of your application

You must register the first view of your application with the ULC system so that the correct class is given control as soon as the ULC environment is properly initialized. To do this, send the following message:

#registerApplicationNamed: <string_parameter> withStartupClass: MyStartUpView

string_parameter is a string that can be used as a command-line parameter. MyStartUpView is the name of the class from which the application view will be instantiated. This new instance of MyStartUpView is opened in a Smalltalk process whose owner is a fully initialized instance of UlcApplication.

Opening additional views in running applications

After the startup view is open, you can open any additional views with this message:

MyOtherViewClass new openWidget

MyOtherViewClass is the name of the class that you want instantiated. The new view is opened in the instance of UlcApplication that is currently active. If you are not sure whether the active Smalltalk process is owned by your UlcApplication instance, send the #evaluate: aBlock message to the UlcProcessOwnerToken of your UlcApplication instance and open the new view inside aBlock.

Opening a child view

To open a new view as a child of a view that is already open, send this message:

MyOtherViewClass new openWidgetAsChildOn: aViewAlreadyOpen

Again, if you are not sure if the Smalltalk process is owned by your application, proceed as described previously.


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