The ON IDLE idle-seconds clause defines a set of instructions that must be executed after idle-seconds of inactivity. This can be used, for example, to quit the dialog after the user has not interacted with the program for a specified period of time. The parameter idle-seconds must be an integer literal or variable. If it evaluates to zero, the timeout is disabled.
ON IDLE 30
IF ask_question(
"Do you want to reload information the database?") THEN
-- Fetch data back from the db server
END IF
The
timeout value is taken into account when the dialog initializes its internal data
structures. If you use a program variable instead of an integer constant, any change of
the variable will have no effect if the variable is changed after the dialog has
initialized. If you what to change the value of the timeout variable, it must be done
before the dialog block.