Hi,
I think you are confused by the similarity of the "interrupt" special action and the SIGINT interrupt signal handling (DEFER INTERRUPT).
Otherwise you would not ask why the 'interrupt' action view is not active during a dialog.
Let me try to clarify:
By default, when a fglrun process gets a SIGINT signal, it stops. It does not matter where you are in the program. This is the default behavior of C programs on UNIX. On Windows there is no such signal, we use the CTRL_C_EVENT of the SetConsolCtrlHandler() API handle CTRL-C (in console mode only).
The DEFER INTERRUPT instruction is typically used in 4gl to prevent immediate program termination in case of SIGINT signal (or CTRL-C event in a Windows console). You should also consider to use DEFER QUIT, for the SIGQUIT signal.
When you are in TUI mode and you run your program from a console, if DEFER INTERRUPT is not used, on UNIX a CTRL-C will send a SIGINT signal to the program and stop it. No matter if you are in a dialog or not.
When you are in GUI mode, and the program was started from the front-end with a shortcut for ex, the only way to send a SIGINT is to open console, identify the process and use the 'signal' command. It's still good practice to use DEFER INTERRUPT / DEFER QUIT in GUI mode to prevent unexpected program termination.
The 'interrupt' special action is something different: It's designed to be active ONLY when NO dialog is executing. Its purpose is to send an async event to fglrun to set INT_FLAG, to stop a procedure, such as a long running report, or an SQL statement (if the DB allows SQL interruption and OPTIONS SQL INTERRUPT ON was set).
So when a dialog is executing, (can be a MENU or a PROMPT as in your examples), it's normal that the 'interrupt' action view is disabled.
The only purpose of an 'interrupt' button is to set INT_FLAG, outside a dialog context. It will not stop the program. It's in the hands of the programmer to test INT_FLAG in a long running loop:
...
OPEN WINDOW ... -- open a window/form with progress bar and 'interrupt' button
LET INT_FLAG = FALSE
START REPORT ...
FOREACH c_orders INTO ...
IF INT_FLAG THEN EXIT FOREACH END IF
OUTPUT TO REPORT ...
END FOREACH
...
Seb