stop event handler instruction

Description

The stop event handler instruction is used to stop listening to events (i.e. to unregister as a listener to an event source).

For more information about Obix's event mechanism, please refer to the section called “Event”.

Syntax

Table 20.22. stop event handler syntax

ProductionSyntaxLinks
stop_event_handler_instruction"stop" "event" "handler" expressionthe section called “stop event handler instruction”

  • expression must evaluate to the object that was stored in the event handler variable of the on event instruction that was used to register the event listener.

Example

// start listening to events
on event tea_ready in tea_machine execute script tea_is_ready handler: tea_ready_handler

// ...

// stop listening to events
stop event handler tea_ready_handler

See also