app

The app system variable references the current transient application instance. JADE automatically creates a unique app object for each JADE application that is running and for each package that is imported (recursively) by the schema from which that application is running.

You can use the app object to store data that is global to the running application or as a place to implement application-specific code.

The app object is a transient instance of the Application subclass for the current schema. This class is created automatically by JADE when a schema is created and it inherits from the Application subclasses of all superschemas.

You can define additional properties and methods in your own application class, if required. For example, the following code fragments access the transient app instance.

write "The current time is " & app.actualTime.String;

if customer.name = "" then
    app.msgBox("Please enter a name", "Error", MsgBox_OK_Only);
endif;

If a method is executing on the server node, the app instance may not be resident, resulting in a fetch from the client node (whereas if you send a message to self, the current receiver of the method that is executing is guaranteed to be resident in cache).