HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
252 Chapter6
USING VPLUS INTRINSICS
USING TERMINAL FEATURES
• Call VLOADFORMS.
When VSHOWFORM is called to display a form, it searches the form storage directory to
determine whether or not the form is already in the terminal.
If the form is in local storage, VSHOWFORM displays it on the screen. If the form is not in
local storage, VSHOWFORM preloads it into the terminal before displaying it when bit 9 of the
comarea
variable
showcontrol
is set to one.
If there is not enough room in terminal memory for the form, the least recently used form
(or forms) is purged from the terminal. If the form is not already in the terminal and is not
preloaded into local form storage (bit 9 is zero), it is written to the screen from the form
definition area of system memory.
(On the HP 2626A terminal, the form is written from memory when
showcontrol
bit 15 is
set to force a write, no matter what the setting of
showcontrol
bit 9 or whether the form is
already in the terminal.)
Look-ahead loading can be performed by setting the
comarea
variable
lookahead
to zero
before the call to VREADFIELDS. The next form, named by
nfname
in VGETNEXTFORM, is
loaded before or after the current form is read depending on the type of data
communications being used. If point-to-point is being used, the next form is loaded before
the current form is read, If multipoint is being used, the next form is loaded after the
current form is read. The least recently used form (or forms) is purged from the terminal if
there is not enough room to load the next form.
VREADFIELDS does not check whether or not the next form loads successfully. If the form
does not load, the next call to VSHOWFORM retrieves it from the form definition area of
system memory.
Forms can also be loaded into local form storage by a call to VLOADFORMS, which simply
loads the forms named in the
forms
parameter. A form loaded by this intrinsic is thus
already in the terminal when the call to VSHOWFORM is made (recall that VSHOWFORM always
checks whether the form is in local storage). Forms are loaded in the order specified in the
forms
parameter as long as there is space in the terminal. Any remaining forms are
ignored.
VLOADFORMS checks to see whether or not a form is loaded. During this check, the keyboard
is locked briefly. To avoid possible loss of keystrokes and/or entered data do not call
VLOADFORMS between VSHOWFORM and VREADFIELDS.
Form Families and Local Storage
VLOADFORMS loads forms strictly by form name so that multiple family members can be
loaded at the same time. For look-ahead loading or preloading, to optimize performance,
the form is not loaded if a related form is currently being displayed or is already in the
terminal. The family member that is in local storage is changed into the required form and
displayed by VSHOWFORM (unless
showcontrol
bit 15 is set to force a fresh copy of the form
to be written).
Note that form family optimization displays any data associated with the required form.
When optimization occurs on the HP 2626A terminal, the form storage directory is
updated to reflect the name of the required form rather than the name of the family
member that was used to make the change.