The Events node (

) is the top node under which you can add
Event nodes to define events. In the
Settings window for this node, you can add the following events.
From the On startup list, select a method that runs before the application window opens. It is therefore not possible to call a plot, for example, or other user-interface-related code (for such methods, you can use an
On load event for forms). A possible use is to set up some special settings for the application (such as changing a settings for a form object). In such cases, the
On startup event is faster than the
On load event for a form object because it runs before the application window opens. You can add the following types of events by choosing from the
Create Global Method menu (

) to the right of the
On data change list:
There can only be one local method and one command sequence so if you add one or both of them, the menu will instead contain Remove Local Method (

) and
Remove Command Sequence (

), respectively. Click one of them to delete the local method or command sequence.
The selected method in the On data change list then changes to the created method or command sequence. To open the selected method or command sequence, click the
Go to Source button (

). The focus then moves to the method’s editor window or the
Command Sequence dialog, respectively.
From the About to shut down list, select a method that runs before the application closes. You can use it to clear or remove some files or add a confirmation check, for example. The method you refer to can return a Boolean value. When it does, and the return value is false, the shutdown will be canceled. You can add the following types of events by choosing from the
Create Global Method menu (

) to the right of the
About to shut down list:
There can only be one local method and one command sequence so if you add one or both of them, the menu will instead contain Remove Local Method (

) and
Remove Command Sequence (

), respectively. Click one of them to delete the local method or command sequence.
The selected method in the About to shut down list then changes to the created method or command sequence. To open the selected method or command sequence, click the
Go to Source button (

). The focus then moves to the method’s editor window or the
Command Sequence dialog, respectively.