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
MENUdialog statement, thecloseaction is converted to anINTERRUPTkey press. If there is aCOMMAND KEYINTERRUPTblock in theMENUstatement, the statements in that control block are executed. Otherwise, no action is taken. - When the program is in an
INPUT,INPUT ARRAY,CONSTRUCTorDISPLAY ARRAYstatement, thecloseaction cancels the dialog, and theint_flagis set toTRUE. Your program can check the value ofint_flagand 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 MENUBy 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.