SeeView Manual
SeeView Programming
HP NonStop SeeView Manual—526355-004
6-8
Use the Same Cache for Each Menu
Use the Same Cache for Each Menu
You need not declare a separate ?MENU cache for each physical menu that is to
appear on the screen. In the SeeView program, a cache is a linearly linked sequential
list of strings containing menu items, data, or commands. Each ?MENU cache requires
a task control block, or TCB, so a cache can have any of the attributes of a TASK. The
minimum size of a cache is one memory page. To reduce the total number of TCBs
and memory a script uses, you might want to use one menu cache to store the text for
multiple physical menu windows.
You can logically divide the single ?MENU into pieces. Logical menus begin with a
target name and end with another target, such as an asterisk (*). When you declare the
menu window, the cache location to be displayed is indicated by a CACHE target
UNTIL another target name occurs. For example:
The OFFSET of 1 is used to vertically offset the cache display by 1, so that the target
label /-DevTypes/ does not appear.
A unique character such as a hyphen before the target name makes the name easier
to find. There are exceptions to using one menu cache. At times you will need more
than one menu cache.
Use Default Productions
A production contains the SeeView statements associated with a menu item. When a
menu item is selected, the statements are executed. Each menu item has either a
specific production or a default production associated with it. The default production is
executed when a menu item has no specific production. Different menu items within a
single menu often require the same functionality. The default production provides a
?MENU mymenu
-DevTypes
DISC
PRINTER
TAPE
*
-Commands
LISTCACHE
LISTDEV
. . .
*
?SECT main
WINDOW mymenu MENU ___________
CACHE /-DevTypes/ | DISC |
UNTIL /*/ | PRINTER |
HEAD "" | TAPE |
OFFSET 0,1; |___________|