Applications and Geodes: 1.2 Geodes: Launching an Application

Up: GEOS SDK TechDocs | Up | Prev: 1.1 Geode Components and Structures | Next: 1.3 Shutting Down an Application
GeodeLoad(), UserLoadApplication(), MSG_GEN_PROCESS_OPEN_APPLICATION

An application is a geode with its GA_APPLICATION attribute set. This type of geode may be launched by the user through GeoManager or some other means provided by the system or another application. For the most part, the system will invoke and carry out the launch; your responsibilities are limited.

An application may be loaded in essentially two ways: It may be launched, or it may be reloaded from a state file. In both cases, the kernel will load the proper resources and build out the UI properly according to the application.

Most of the procedure of launching is handled within GenProcessClass , a subclass of ProcessClass . An application should define its own subclass of GenProcessClass for its Process objects (event-driven threads not acting as Process objects should be subclassed from ProcessClass , not GenProcessClass ). The launch procedure may be invoked by any thread and by any geode in either of the following ways:

Geodes may be launched in three modes:

It is possible, however, for one application to launch another in a custom mode. If this is done, the application being launched is responsible for implementing the special mode.

When the launch process has been initiated with the above routines, a thread is created for the application and its Process object is loaded immediately. Also loaded is the application's GenApplication object. The Application and Process objects interact with the User Interface to load the objects on the application's active list and set them all usable, bringing them up on-screen.

Near the end of this procedure, just before the GenApplication is set usable, the Process object will receive a message based on the mode of launch. If the application must set up any special notification (such as for the quick-transfer mechanism) or must restore special state file data, it should intercept this message. Typically the message received will be MSG_GEN_PROCESS_OPEN_APPLICATION --two others are received (when restoring from state and when opening in engine mode), but they should not be intercepted.


Up: GEOS SDK TechDocs | Up | Prev: 1.1 Geode Components and Structures | Next: 1.3 Shutting Down an Application