SeeView Manual

SeeView Programming
HP NonStop SeeView Manual526355-004
6-7
Develop the Script
Develop the Script
Follow these guidelines as you develop the script:
Develop Top-Down
Use Relative Menu Locations
Use the Same Cache for Each Menu
Use Default Productions
Write Your Procedures
Comment As You Code
Test As You Code
Develop Top-Down
When you write a script, do it in a top-down manner. First, declare a menu-cache
(using the ?MENU directive) and enter the text that is to appear for all the menus in the
entire script.
The menu cache is the memory where the menu text is stored. It is not the same as
the menu that appears with a WINDOW statement. It does not matter if SeeView has
not been told what to do with the text or if procedures are being referenced that do not
yet exist. This makes top-down implementation straightforward.
Next, declare a section with a ?SECTION directive and use a WINDOW ... MENU
statement to display the main menu. Then you are ready to code the major
functionality of the script.
Use Relative Menu Locations
In general, try to design the menus so that the main menu is never erased or covered
up. Menus other than the main menu should have relative, not absolute locations. Use
the BESIDE and BELOW statements, as well as the SeeView intrinsics #MENULINE,
#MENUCOL, #MENUWIDTH, and #MENUHEIGHT to achieve relative menu
positioning. These SeeView intrinsics are symbolic names associated with values that
are intrinsic to the environment. For example, #MENULINE and #MENUCOL are the
line and column number on the screen of the most recently referenced menu. Working
with these intrinsics makes it easy to move everything around later.
For example, if the width of the main menu is increased by 10, a script should still
function, and no windows should be overdrawn. Try to follow this rule although it might
not be possible at all times.