Application - Kirix Documentation

Developer Resources



The application class represents a script application and is primarily reponsible for starting and stopping the script event loop. In event-oriented programming, the event loop drives the user interface aspects of the program, and coordinates the connection between the program code and the user's actions. Using the Application object allows the usage of Forms and interactive script programs.


Exits the event loop and stops the script from running.
Starts the event loop for a form.


// create an instance of our derived MyForm class
// and show it
var f = new MyForm;;

// start the event loop.  At this point in the script, execution
// is turned over to the event loop, which the Application class manages.
// Execution will proceed from here only after Application.exit is called.;

alert("This message appears after the event loop has exited.");

// our Form-derived class
class MyForm extends Form
    function MyForm()
        super("Hello World", 100, 100, 200, 100);
        this.add(new Label("Click on the form to stop the application.",

function exitFunction()
    // calling Application.exit() will terminate the event loop.  Execution
    // will continue in the same scope in which was called


static function Application.exit()


Exists the event loop and stops the script from running.

static function


Starts the event loop for a form. When using forms in a script, this function must be called before the form can register events.