This is a discussion on Disappearing menus within the pgsql Databases forums, part of the PostgreSQL category; --> Disappearing menus I have been programming in Progress 4GL character for many years and have been sticking my toe ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Disappearing menus I have been programming in Progress 4GL character for many years and have been sticking my toe into the GUI/ChUI waters in the past few weeks. I have run into, what seems like, a small problem that I can't find information about while developing in ChUI. The problem may actually be two sides of the same issue. I have created a procedure that uses menu bars. It is quite lovely, but when I go into Help (F2), the menus from the calling procedure remains visible and accessible, though not functional, while doing the help stuff. A day or so ago I ran into what could be the other side of the problem. When in Help (F2) if a procedure is called that has its own menu bar, the calling procedure's menu bar is replaced, but when I return to the calling program, its menu bar is gone. This later problem only occurs if one of the procedures called in Help has a menu bar. All others in Help, even those with "hide all" does not remove the calling procedures menu bar. Q: How would one hide the menu bar of the calling procedure when entering Help? Q: How would one restore the menu bar of the calling procedure when returning? Running 9.1D Problem occurs on both Solaris Sparc and Winblows. A push in the right direction would be greatly appreciated. Thanks in advance for any help. P Load |
| |||
| Can you post code snippets that will illustrate the problem? Menu bars are usually associated with a window, and it sounds a bit like the menu bar associated with a window has been "disassociated" i.e. the current-window:menubar attribute has been set to ? or some other non-valid handle. (In CHui you only have one window.) P Load wrote: > Disappearing menus > > I have been programming in Progress 4GL character for many years and have > been sticking my toe into the GUI/ChUI waters in the past few weeks. I have > run into, what seems like, a small problem that I can't find information > about while developing in ChUI. > > > > The problem may actually be two sides of the same issue. I have created a > procedure that uses menu bars. It is quite lovely, but when I go into Help > (F2), the menus from the calling procedure remains visible and accessible, > though not functional, while doing the help stuff. A day or so ago I ran > into what could be the other side of the problem. When in Help (F2) if a > procedure is called that has its own menu bar, the calling procedure's menu > bar is replaced, but when I return to the calling program, its menu bar is > gone. This later problem only occurs if one of the procedures called in Help > has a menu bar. All others in Help, even those with "hide all" does not > remove the calling procedures menu bar. > > > > Q: How would one hide the menu bar of the calling procedure when entering > Help? > > > > Q: How would one restore the menu bar of the calling procedure when > returning? > > > > Running 9.1D > > Problem occurs on both Solaris Sparc and Winblows. > > > > A push in the right direction would be greatly appreciated. > > Thanks in advance for any help. > > P Load > > -- /* ================================================== ============= */ I know you believe you understand what you think I said, but I am not sure you realize that what you heard was not what I meant. William E Colls President Tel 613 591 0079 PROComputer Systems Fax 613 591 3924 67 Willow Glen Dr. www.procomsys.com Kanata Ontario K2M 1T1 Specialists in Progress Database systems since 1986 |
| |||
| Here's three files, tmp1.p, tmp2.p and applhelp.p. I stripped about as much as I could out of the procedures while keeping them functional. Run tmp1.p in character mode and press F2. When in applhelp.p note the File menu is still there and, if applhelp.p were doing more than it is, you could F3 into the menu, but it would ignore any choice. Once in tmp2.p note the button and menu has changed as it should. Now return and try to find the menu bar. Run tmp1.p again and press F2, but this time press F4 to return to tmp1.p without executing tmp2.p and you'll see that menu bar of tmp1.p intact. Note also that I have done this using both static and dynamic menus. Thanks for looking at this. P Load /*tmp1.p*/ DEFINE SUB-MENU m_file MENU-ITEM o_exit LABEL "E&xit":U. DEFINE MENU m_bar MENUBAR SUB-MENU m_file LABEL "&File":U. DEFINE BUTTON BtnDone DEFAULT LABEL "&Done or press F2" SIZE 18 BY 1.14 BGCOLOR 8 . DEFINE FRAME DEFAULT-FRAME BtnDone AT ROW 4.1 COL 31 WITH 1 DOWN NO-BOX AT COL 1 ROW 1 SIZE 80 BY 16 DEFAULT-BUTTON BtnDone. ASSIGN DEFAULT-WINDOW:MENUBAR = MENU m_bar:HANDLE. ON CHOOSE OF BtnDone IN FRAME DEFAULT-FRAME DO: APPLY "CLOSE":U TO THIS-PROCEDURE. END. ENABLE BtnDone WITH FRAME DEFAULT-FRAME. WAIT-FOR CHOOSE of MENU-ITEM o_exit in MENU m_file or WINDOW-CLOSE of CURRENT-WINDOW or CLOSE of THIS-PROCEDURE. /*end of tmp1.p*/ /*applhelp.p*/ display "Now we'll call tmp2.p" with row 5 col 5. pause. run tmp2.p. /*end of applhelp.p*/ /*tmp2.p*/ DEFINE SUB-MENU m_file MENU-ITEM o_return LABEL "&Return":U. DEFINE MENU m_bar2 MENUBAR SUB-MENU m_file LABEL "&Help":U. DEFINE BUTTON BtnReturn LABEL "&Exit help" SIZE 18 BY 1.14 BGCOLOR 8 . DEFINE FRAME HELP-FRAME BtnReturn AT ROW 4.1 COL 31 WITH 1 DOWN OVERLAY AT COL 1 ROW 1 SIZE 80 BY 16 TITLE "Help Stuff" DEFAULT-BUTTON BtnReturn. ASSIGN DEFAULT-WINDOW:MENUBAR = MENU m_bar2:HANDLE. ON CHOOSE OF BtnReturn IN FRAME HELP-FRAME DO: APPLY "CLOSE":U TO THIS-PROCEDURE. END. hide all. VIEW FRAME HELP-FRAME. ENABLE all WITH FRAME HELP-FRAME. WAIT-FOR CHOOSE of MENU-ITEM o_return in MENU m_file or WINDOW-CLOSE of CURRENT-WINDOW or CLOSE of THIS-PROCEDURE. /*end of tmp2.p*/ "William" <william@procomsys.com> wrote in message news:4046A200.1020702@procomsys.com... > Can you post code snippets that will illustrate the problem? > > Menu bars are usually associated with a window, and it sounds a bit like > the menu bar associated with a window has been "disassociated" i.e. the > current-window:menubar attribute has been set to ? or some other > non-valid handle. (In CHui you only have one window.) > > P Load wrote: > > > Disappearing menus > > > > I have been programming in Progress 4GL character for many years and have > > been sticking my toe into the GUI/ChUI waters in the past few weeks. I have > > run into, what seems like, a small problem that I can't find information > > about while developing in ChUI. > > > > > > > > The problem may actually be two sides of the same issue. I have created a > > procedure that uses menu bars. It is quite lovely, but when I go into Help > > (F2), the menus from the calling procedure remains visible and accessible, > > though not functional, while doing the help stuff. A day or so ago I ran > > into what could be the other side of the problem. When in Help (F2) if a > > procedure is called that has its own menu bar, the calling procedure's menu > > bar is replaced, but when I return to the calling program, its menu bar is > > gone. This later problem only occurs if one of the procedures called in Help > > has a menu bar. All others in Help, even those with "hide all" does not > > remove the calling procedures menu bar. > > > > > > > > Q: How would one hide the menu bar of the calling procedure when entering > > Help? > > > > > > > > Q: How would one restore the menu bar of the calling procedure when > > returning? > > > > > > > > Running 9.1D > > > > Problem occurs on both Solaris Sparc and Winblows. > > > > > > > > A push in the right direction would be greatly appreciated. > > > > Thanks in advance for any help. > > > > P Load > > > > > > -- > /* ================================================== ============= */ > > I know you believe you understand what you think I said, but I am not > sure you realize that what you heard was not what I meant. > > William E Colls President > Tel 613 591 0079 PROComputer Systems > Fax 613 591 3924 67 Willow Glen Dr. > www.procomsys.com Kanata Ontario K2M 1T1 > > Specialists in Progress Database systems since 1986 > |
| |||
| I have whipped up a little more vigorous applhelp.p so that you can see that the menu bar from tmp1.p remains visible and selectable while in applhelp.p (before going to tmp2.p) when F3 is pressed, but choosing the Exit from the menu is ignored. The fact that tmp1.p's menus are ignored in applhelp.p is a good thing I suppose. Disabling it using the dialog-box option is even better. But this still leaves us with the vanishing menu bar. P Load /*New applhelp.p*/ def button but1 label "Get Help". FORM "Button will" skip "run tmp2.p" skip(1) but1 with row 5 col 14 title "Help stuff" /*view-as dialog-box*/ . ON CHOOSE of but1 do : run tmp2.p. message "Back in applhelp.p" view-as alert-box. apply "CLOSE" to THIS-PROCEDURE. end. enable all. WAIT-FOR WINDOW-CLOSE of CURRENT-WINDOW or CLOSE of THIS-PROCEDURE. /*end of new applhelp.p*/ "William" <william@procomsys.com> wrote in message news:4046A200.1020702@procomsys.com... > Can you post code snippets that will illustrate the problem? > > Menu bars are usually associated with a window, and it sounds a bit like > the menu bar associated with a window has been "disassociated" i.e. the > current-window:menubar attribute has been set to ? or some other > non-valid handle. (In CHui you only have one window.) > > P Load wrote: > > > Disappearing menus > > > > I have been programming in Progress 4GL character for many years and have > > been sticking my toe into the GUI/ChUI waters in the past few weeks. I have > > run into, what seems like, a small problem that I can't find information > > about while developing in ChUI. > > > > > > > > The problem may actually be two sides of the same issue. I have created a > > procedure that uses menu bars. It is quite lovely, but when I go into Help > > (F2), the menus from the calling procedure remains visible and accessible, > > though not functional, while doing the help stuff. A day or so ago I ran > > into what could be the other side of the problem. When in Help (F2) if a > > procedure is called that has its own menu bar, the calling procedure's menu > > bar is replaced, but when I return to the calling program, its menu bar is > > gone. This later problem only occurs if one of the procedures called in Help > > has a menu bar. All others in Help, even those with "hide all" does not > > remove the calling procedures menu bar. > > > > > > > > Q: How would one hide the menu bar of the calling procedure when entering > > Help? > > > > > > > > Q: How would one restore the menu bar of the calling procedure when > > returning? > > > > > > > > Running 9.1D > > > > Problem occurs on both Solaris Sparc and Winblows. > > > > > > > > A push in the right direction would be greatly appreciated. > > > > Thanks in advance for any help. > > > > P Load > > > > > > -- > /* ================================================== ============= */ > > I know you believe you understand what you think I said, but I am not > sure you realize that what you heard was not what I meant. > > William E Colls President > Tel 613 591 0079 PROComputer Systems > Fax 613 591 3924 67 Willow Glen Dr. > www.procomsys.com Kanata Ontario K2M 1T1 > > Specialists in Progress Database systems since 1986 > |
| ||||
| I may have muddied things up when I drew attention to F2, the Character run Help. The behavior of loosing the menu occurs when a second procedure is run directly from a procedure as well as when called by applhelp.p. But, if called directly the behavior is even more bizarre in the calling procedure on return, as in these examples: /*tmp1.p*/ DEFINE SUB-MENU m_file MENU-ITEM o_exit LABEL "E&xit" MENU-ITEM o_run LABEL "&Run tmp2". DEFINE MENU m_bar MENUBAR SUB-MENU m_file LABEL "&File". DEFINE BUTTON BtnDone DEFAULT LABEL "&Done or press F2" SIZE 18 BY 1.14 BGCOLOR 8 . DEFINE FRAME DEFAULT-FRAME BtnDone AT ROW 4.1 COL 31 WITH 1 DOWN NO-BOX AT COL 1 ROW 1 SIZE 80 BY 16 DEFAULT-BUTTON BtnDone. ASSIGN DEFAULT-WINDOW:MENUBAR = MENU m_bar:HANDLE. ON CHOOSE OF MENU-ITEM o_run DO : RUN tmp2.p. END. ON CHOOSE OF BtnDone IN FRAME DEFAULT-FRAME DO: APPLY "CLOSE":U TO THIS-PROCEDURE. END. ENABLE BtnDone WITH FRAME DEFAULT-FRAME. WAIT-FOR CHOOSE of MENU-ITEM o_exit in MENU m_file or WINDOW-CLOSE of CURRENT-WINDOW or CLOSE of THIS-PROCEDURE. /*end tmp1.p*/ /*tmp2.p*/ DEFINE SUB-MENU m_file MENU-ITEM o_return LABEL "&Return". DEFINE MENU m_bar2 MENUBAR SUB-MENU m_file LABEL "&Help". DEFINE BUTTON BtnReturn LABEL "&Exit help" SIZE 18 BY 1.14 BGCOLOR 8 . DEFINE FRAME HELP-FRAME BtnReturn AT ROW 4.1 COL 31 WITH 1 DOWN OVERLAY AT COL 1 ROW 1 SIZE 80 BY 16 TITLE "Help Stuff" DEFAULT-BUTTON BtnReturn. ASSIGN DEFAULT-WINDOW:MENUBAR = MENU m_bar2:HANDLE. ON CHOOSE OF BtnReturn IN FRAME HELP-FRAME DO: APPLY "CLOSE":U TO THIS-PROCEDURE. END. hide all. VIEW FRAME HELP-FRAME. ENABLE all WITH FRAME HELP-FRAME. WAIT-FOR CHOOSE of MENU-ITEM o_return in MENU m_file or WINDOW-CLOSE of CURRENT-WINDOW or CLOSE of THIS-PROCEDURE. /*end tmp2.p*/ /*applhelp.p*/ def button but1 label "Get Help". FORM "Button will" skip "run tmp2.p" skip(1) but1 with row 5 col 14 title "Help stuff" /*view-as dialog-box*/ . ON CHOOSE of but1 do : run tmp2.p. message "Back in applhelp.p" view-as alert-box. apply "CLOSE" to THIS-PROCEDURE. end. enable all. WAIT-FOR WINDOW-CLOSE of CURRENT-WINDOW or CLOSE of THIS-PROCEDURE. /*end applhelp.p*/ These procedures were originally built using the AppBuilder and stripped down to better post for comments. I must be doing something fundamentally wrong. But what? Don't use menu bars in ChUI? Thanks for any help, P Load |