JSup Code script containers (Bozza)

[JSup domains|Shared/user domains] e [JSup graphic windows|graphic windows] contain scripts that can be condition/timed/trigger executed.

To edit [JSup domains|domain] code you have to access to the [JSup Application properties|Application properties dialog] and then click on one of the button Edit Shared/User code.

To edit the code of a [JSup graphic windows|graphic window] you have to open the [JSup Window property dialog|Window property dialog] (menu Window / Window properties).

There are different kind of code.

Active codes

These codes are executed on some condition and can be used to initialize, clear, update some tag or other actions.

Domain

For [JSup domains|domain] they are:

  • Shared domain:
    • On startup: executed when JSup system start in runtime.
    • While active: executed (at the given ms interval) when the JSup system is active.
    • On shutdown: executed just before a normal JSup system shutdown.
  • User domain (in a [JSup Multiuser support|multiuser environment] every client has its own user domain code):
    • On startup: executed when the user interface is started.
    • While active: executed (at the given ms interval) while the user interface is active.
    • On shutdown: executed just before a normal shutdown of the user interface.

Window

In the [JSup graphic windows|graphic window] they are:

  • Show code (code whose execution is determined by the condition the window is visible):
    • On show: called before activating the animations of the window graphic object.
    • While showing: executed (at the given ms interval) while the windows is shown.
    • On hide: called before deactivating the animations of the window graphic objects.
  • Active code (code whose execution is determined by the condition the window is the active one, within the JSup graphic interface... or has the focus):
    • On active: executed when the window get the focus.
    • While active: executed (at the given ms interval) while the window has the focus.
    • On deactivate: executed when the window loose the focus.

Conditions

Many [JSup Condition scripts|condition scripts] can be defined to react to a lot of different situations.

Triggered/Timed

[JSup Timed and triggered scripts|Timed /triggered scripts] are executed when some tag change its value or when an interval time has elapsed.

JavaCode functions

[JavaCode functions] are utility function that can used by other [JavaCode|JavaCodes] or [JSup Math code|Math code] within the scope of the container (the [JSup domains|domain] of the [JSup graphic windows|graphic window]).

Key code

Not in the [JSup domains|shared domain].
[JSup Key codes|Key codes] are script that will be invoked when the given key combination is pressed.
For [JSup graphic windows|graphic window] [JSup Key codes|key codes] the action is performed only if the window is showed when the key is pressed.

JavaCode common

A place where to define global (static) variable/object to be used by [JavaCode|JavaCodes] within the scope of the container.
See [JavaCode functions] for better way to define static variable to be used by your code in more exportable/importable way.