Problem with EXIT_FORM (Domino-effect)

From: <hatzinger_m_at_bmwf1f.bmwf.gv.at>
Date: 9 Sep 92 07:14:49 GMT
Message-ID: <1992Sep9.085923.44_at_bmwf1f.bmwf.gv.at>


Hi,

My english is not very good, but I hope you will understand me. I have a form which calls another form. And this form calls another form and another form and so on. Now if I press the <PAGE UP> key, I want to exit the current form. But if I press the <EXIT> key, I want to exit all forms, so I get back to the operating system or SQL*Menu.

  • OS ----------- | ^ Form A | | | v | Form B | | |<EXIT> v | Form C<--+ | | |<PG UP> | v | | Form D--------------+

The only way I know, is to work with a global flag, I call it GLOBAL.EXIT. If I press the <EXIT> key, a global flag is set to TRUE and an exit occurs. The previous form now looks if global.exit was set to true. If it was set, the previous form also releases an exit. This is like the Domino-effect.

Triggers:

KEY-EXIT


:GLOBAL.EXIT := 'TRUE';

EXIT_FORM; KEY-PRVBLK


:GLOBAL.EXIT := 'FALSE';

EXIT_FORM; Previous form (eg. Form C):

Procedure "CALL_FORM_D"

CALL('FORM_D'); DEFAULT_VALUE('FALSE','GLOBAL.EXIT'); IF :GLOBAL.EXIT = 'TRUE' THEN
   EXIT_FORM;
END IF; This is my solution, but is there any way to do this more easily ?

Any ideas ?


                                                                          ^
 Federal Ministry of Science and Research                               B | M
<-------------------------------------------------------------------------+---->
 Computer Center                                                        W | F
                                                                          |
 Klaus-Michael Hatzinger            mail: hatzinger_m_at_bmwf1f.bmwf.gv.at   |
 Bankgasse 1/209                   phone: 0043-222-53120/5188             |
 1014 Vienna, Austria                fax: 0043-222-53120/5155             V
================================================================================
Received on Wed Sep 09 1992 - 09:14:49 CEST

Original text of this message