home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / database / oracle / 1538 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  2.4 KB

  1. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!swrinde!gatech!paladin.american.edu!news.univie.ac.at!bmwf1f.bmwf.gv.at!hatzinger_m
  2. From: hatzinger_m@bmwf1f.bmwf.gv.at
  3. Newsgroups: comp.databases.oracle
  4. Subject: Problem with EXIT_FORM (Domino-effect)
  5. Message-ID: <1992Sep9.085923.44@bmwf1f.bmwf.gv.at>
  6. Date: 9 Sep 92 07:14:49 GMT
  7. Organization: (Klaus-Michael Hatzinger), BMWF, Vienna
  8. Lines: 69
  9.  
  10.  
  11. Hi,
  12.  
  13. My english is not very good, but I hope you will understand me. I have a form 
  14. which calls another form. And this form calls another form and another form 
  15. and so on. Now if I press the <PAGE UP> key, I want to exit the current 
  16. form. But if I press the <EXIT> key, I want to exit all forms, so I get 
  17. back to the operating system or SQL*Menu.
  18.  
  19. -------- OS -----------
  20.   |                 ^
  21. Form A              |
  22.   |                 |
  23.   v                 |
  24. Form B              |
  25.   |                 |<EXIT>
  26.   v                 |
  27. Form C<--+          |
  28.   |      |<PG UP>   |
  29.   v      |          |
  30. Form D--------------+
  31.  
  32.  
  33. The only way I know, is to work with a global flag, I call it GLOBAL.EXIT. 
  34. If I press the <EXIT> key, a global flag is set to TRUE and an exit occurs.
  35. The previous form now looks if global.exit was set to true. If it was set, 
  36. the previous form also releases an exit. This is like the Domino-effect.
  37.  
  38. Triggers:
  39.  
  40. KEY-EXIT
  41. ========
  42.  
  43. :GLOBAL.EXIT := 'TRUE';
  44. EXIT_FORM;
  45.  
  46. KEY-PRVBLK
  47. ==========
  48.  
  49. :GLOBAL.EXIT := 'FALSE';
  50. EXIT_FORM;
  51.  
  52. Previous form (eg. Form C):
  53.  
  54. Procedure "CALL_FORM_D"
  55.  
  56. CALL('FORM_D');
  57.  
  58. DEFAULT_VALUE('FALSE','GLOBAL.EXIT');
  59.  
  60. IF :GLOBAL.EXIT = 'TRUE' THEN 
  61.    EXIT_FORM;
  62. END IF;
  63.  
  64.  
  65. This is my solution, but is there any way to do this more easily ?
  66.  
  67. Any ideas ?
  68.  
  69. ================================================================================
  70.                                                                           ^
  71.  Federal Ministry of Science and Research                               B | M
  72. <-------------------------------------------------------------------------+---->
  73.  Computer Center                                                        W | F
  74.                                                                           |
  75.  Klaus-Michael Hatzinger            mail: hatzinger_m@bmwf1f.bmwf.gv.at   |
  76.  Bankgasse 1/209                   phone: 0043-222-53120/5188             |
  77.  1014 Vienna, Austria                fax: 0043-222-53120/5155             V
  78. ================================================================================
  79.