The Close Action
In Genero applications, when the user clicks the "X" button in the upper-right corner
of the application window, a predefined close
action is sent to the program.
What happens next depends on the interactive dialog statement.
- When the program is in a
MENU
dialog statement, theclose
action is converted to anINTERRUPT
key press. If there is aCOMMAND KEY
INTERRUPT
block in theMENU
statement, the statements in that control block are executed. Otherwise, no action is taken. - When the program is in an
INPUT
,INPUT ARRAY
,CONSTRUCT
orDISPLAY ARRAY
statement, theclose
action cancels the dialog, and theint_flag
is set toTRUE
. Your program can check the value ofint_flag
and take appropriate action.
You can change this default behavior by overwriting the
close
action within the
interactive statement, by defining an ON ACTION close
control
block:MENU
...
ON ACTION close
EXIT MENU
END MENU
By default the action view for the close
action is hidden and does not display
on the form, because The "X" button of the window is considered as an explicit action view.