Kbase 13135: How to get Menubar in Version 7 tty window ( and s/e 4139 )
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
How to get Menubar in Version 7 tty window ( and s/e 4139 )
This Notebook entry outlines how to put a UIB-generated menubar on
the default window for a character-mode application. It also
discusses common problems encountered with the technique.
Users who develop applications in the UIB (GUI mode)
and then port the application to TTY mode, may find
that they get error 'CREATE WINDOW in character-mode
is not supported' (4139).
In character mode, there is only one window (the
default window). When developing in the UIB, users should
select the 'window creation suppressed' option in the
property sheet for the window. This will:
1) suppress the CREATE WINDOW statement in the .w
AND 2) set up the default window to be the current
window. If you choose to edit the code in the procedure
editor (instead of using 'suppress window creation'
option in UIB), then you must be sure to do BOTH
of the above steps.
If you want to have a menu bar off of the window, it
will not display in TTY mode unless you specifically
assign the desired menu handle to the default window's
MENUBAR attribute.
In general form, these are the steps you need to follow
in order to get the menubar to function on the character-mode
default window:
1> in the UIB, create a new window. Edit the property sheet
to toggle ON the Suppress Window option. Click on the
Menu Bar icon in the property sheet to create your menubar
as desired.
2> Save the .w
3> Pull up the Procedure Editor from the Tools drop down list.
Open the .w you saved above. Find the line which does the
:MENUBAR attribute assignment and copy it into the Main block
of the procedure, substituting DEFAULT-WINDOW:MENUBAR in
place of whatever window handle specification was there.
4> Save the modified .w
You should be able to bring this modified .w back into the UIB
successfully if you made no other changes.
References to other documentation:
V7 Programming Handbook chpt. 20 "Menus"
V7 Programming Handbook chpt. 23 "Interface Design"
Progress Software Technical Support Note # 13135