SHIP:Node:listener

From Serious Documentation
Revision as of 13:00, 25 January 2013 by Admin (talk | contribs) (Child Nodes)
Jump to: navigation, search

Node Home

Node Type Description
listener Monitors one or more properties (including variable values!) for changes, and on changes invokes a script.

listener nodes are the heart of the event system. With the listeningto property, a listener can monitor one or more properties (including variable values) in SHIP. When any of these properties change, the listener is awoken. It tests the (optional) condition, and if the condition passes (or does not exist) it then runs any enclosed script nodes.

listener nodes can exist only in the layout area.

Parent Nodes

The following nodes are permitted to hold this node:

Descendants

The following nodes are permitted within listeners:

Node Type Description
script Run-time algorithms, written in SHIPSail.
constant Defines a constant value for use in SHIPTide properties or SAIL scripts.
group Lightweight node that encloses other nodes for pure organizational benefit, or to create an array of nodes.
variable Run-time value accessible by scripts and able to generate events on change.

only these nodes are permitted directly underneath the listener node.

Properties

Property Name Data Type Description
name** String The name used to identify this node in SHIPTide.
listeningto** Reference:property List Comma separated list of one or more node properties that, when changed, wake the listener
condition** NumRetExp (optional) If this expression evaluates to be non-zero or true the attached script is allowed to run.
enabled Boolean If true (default) this node and its children are able to receive events.

*available at SHIPEngine run time only and cannot be set in SHIPTide. Use a Sail script at shiplaunch time if this property needs to be set when the GUI starts to run.

**available only in SHIPTide; cannot be accessed from Sail scripts at run-time.

Examples