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”.
Table 8.22. stop event handler syntax
| Production | Syntax | Links |
|---|---|---|
stop_event_handler_instruction | "stop" "event" "handler" expression | the 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.
// 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