script

A global level script node defines a global module package. The package is available to all scripts as a global table with a name equal to the name attribute in the definition.

The script contents can be specified either directly, as the contents of the element, or indirectly in an external source file defined using the file attribute.

Inline code must be escaped to match the XML specification. Inline code will be processed as a single line of text and will not have meaningful line number definitions in warnings and errors.


Definition

<script name="..." file="..." > ... </script>

Interface

onClose

function onClose()

If present, this function is executed when the package is destroyed. This happens when the application is closed, before the database or user interface are destroyed.



onInit

function onInit()

If present, this function is executed when the package is evaluated. This happens when the application is started, after the user interface has been constructed but before any user interaction.