Response Definition
Respond to a block being left implicitly.
response to termination
[ACTION_STATEMENT] ...
ACTION_STATEMENT
An action statement.
Description
This statement can be specified within a block to trigger an action whenever that block is left implicitly. This statement is not taken when the block is left explicitly with the leave block keywords.
Note that you cannot use a leave block statement with a response to termination response definition.
This statement cannot contain a block, nor can it contain a reference to any action routine or subroutines that contain a block. If it does, an irrecoverable runtime error may occur, and no error message will be generated.
Example
enabled graphical region Name size 50 20
at position 0 100 border
disabled invisible key TypeName
at position 10 10 in Name
...
enabled graphical region Number size 50 20
at position 100 100 border
response to Name
make TypeName visible
begin
response to char "\n" from keyboard
leave block
response to char from keyboard
add to TypeName
text input
response to termination
make TypeName invisible
end