Shared/user domains e graphic windows contain scripts that can be condition/timed/trigger executed.
To edit domain code you have to access to the Application properties dialog and then click on one of the button Edit Shared/User code.
To edit the code of a graphic window you have to open the 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 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 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 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 condition scripts can be defined to react to a lot of different situations.
Triggered/Timed
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 JavaCodes or Math code within the scope of the container (the domain of the graphic window).
Key code
Not in the shared domain.
Key codes are script that will be invoked when the given key combination is pressed.
For graphic window 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 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.
|