HTBasic Help
×
Menu
Index

Event-Initiating Branching

 
Introduction
 
Most widgets have one or more associated events. An event results from an action by the user or from an action generated from within the program. You can use the DISABLE EVENT, ENABLE EVENT, OFF EVENT, ON EVENT, and WAIT FOR EVENT commands to generate event-initiated branches for your program. This is called "event-initiated branching".
 
For example, the SLIDER widget has three defined events: CHANGED, DONE, and
SYSTEM MENU:
 
·
The CHANGED event is generated every time the user changes the SLIDER VALUE by clicking on the arrows or in the trough or by clicking and dragging the slider
 
·
The DONE event is generated when the user releases the mouse button
 
·
The SYSTEM MENU event is generated when the user selects items from the SYSTEM MENU.
 
Event-Initiated Branching Commands
 
Event-initiated branching is a programming technique that uses defined event actions as interrupts to redirect program flow. The following table summarizes the event-initiated branching commands. Click the command name for a description of the command.
 
Command
Description
 
Disables program branching upon receipt of specified event
 
Enables program branching upon receipt of specified event
 
Cancels event branches defined by ON EVENT
 
Defines event branch taken after a widget generates that event
 
Suspends program execution until an event occurs