SeeView Manual
SeeView Language Elements
HP NonStop SeeView Manual—526355-004
5-20
Modeless Prompts
•
?PROC FileInfo uses input parameter #subvol to display FUP INFO * output for
#subvol.
•
?SECT EnterSubvol is executed when the script is invoked.
When the script in Example 5-9 is executed, this sequence occurs:
?SECT EnterSubvol positions the screen buffer address beside the calling menu so
that the prompt appears beside the caller’s menu. The ?PROC Prompt is called with
input parameter #prompt defining the format of the Prompt window and input
parameter #action defining the production “BELOW; CALL FileInfo(#menuinput)” to
associate with the Prompt window.
When you move the cursor to the Prompt window and press Return:
•
The production associated with the window is executed “BELOW; CALL
FileInfo(#menuinput)”.
•
The text contained in the prompt field, “$DATA.SEEC20”, is passed to the ?PROC
FileInfo via the intrinsic #menuinput.
•
The FUP information output for that subvolume appears.
You can select another subvolume at any time by moving the cursor to the Prompt
window, entering the name of another subvolume, and pressing Return. All of the
windows, menus, and prompts displayed in Figure 5-6 are active at all times. You are
free to interact with all visible objects because the environment is modeless.
Example 5-9. Example of Modeless Prompt Usage
?MENU scratch
?PROC Prompt(#prompt,#action)
{---------------------------- { Proc does a nowaited prompt.
PARM #prompt IN, { Format <Prompt>[<response>]
#action IN; { Production to execute
PUSH #prompt & "<==?" { Make prompt text a production
ONTO scratch; { and store result in a cache.
WINDOW scratch MENU #action { Window on prompt text with
GLASS HEAD "Prompt" { #action= default production.
CACHE LASTLINE FOR 1 { Text is last line of cache,
SIZE #SIZE #prompt+4; { and has a width of prompt+4
?PROC FileInfo( #subvol )
{------------------------ { Proc does FUP INFO on #subvol
PARM #subvol;
TASK fup; { Declare fup task
WINDOW fup,"info " & #subvol & ".*" { Window on output
CACHE LASTLINE NOFRAME; { without waiting.
?SECT EnterSubvol
{---------------- { Popup up a prompt for Subvol
BESIDE; CW; { Position beside caller menu.
CALL Prompt( "Enter Subvol:[ ]",
"BELOW; CALL FileInfo(#menuinput)" );