|
|
HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Appendix L A Programmer's Guide to VPLUSVPLUS Enhancements |
|
There have been many changes and enhancements to VPLUS since version B.04.10. This section will briefly discuss some of the changes and enhancements and how they can be of use to the programmer. The ones reviewed in this section are:
With HPTOUCH support in VPLUS, a programmer may design a form that is to be used with the HP150, the 2393A or the 2397A. Users may select a field by touching the field on the screen. When a field is selected, VREADFIELDS interprets the row and column coordinates into a field number. VREADFIELDS returns the field number as a negative number to LASTKEY. Negative numbers are returned into LASTKEY so as to distinguish from the positive number that is returned when a function key is hit. LASTKEY is set to -999 if the area touched is not a field. HPTOUCH is enabled by setting bit 0 of the SHOWCONTROL word in the user's COMAREA to 1. An example of coding the HPTOUCH feature is outlined in the VPLUS/V Reference Manual in Appendix E. Currently, HPTOUCH is supported on the 2393A, 2397A and HP150 terminals. For an up-to-date list of the terminals supporting HPTOUCH, refer to Appendix G of the VPLUS/V Reference Manual. VPLUS displays the screen and positions the cursor to the first field on the form. With some applications, positioning the cursor elsewhere would eliminate the requirement that the user press T to get to the desired field. VPLACECURSOR is a new intrinsic introduced in VPLUS version B.04.10 which allows the cursor to be positioned at an unprotected field. An unprotected field is any field in which the user is allowed to enter data. Protected fields may be headings or display-only fields. If the cursor is positioned at a display-only field, an error is returned. VSHOWFORM should be called first before positioning the cursor. The parameters of VPLACECURSOR are:
With 264X terminals, there are no function key labels like the 262X or 239X terminals. As of VPLUS version B.04.10 which was introduced in MPE version G.01.01, function key labels may now be displayed on 264X terminals. With this version of VPLUS, function key labels appear in lines 23 and 24 of the terminal display on a 264X terminal. With 264X terminals, function keys may be displayed by performing the following steps:
Prior to this enhancement, if VFIELDEDITS detected a field in error, the total number of errors would be set in the NUMERRS word of the user's COMAREA. All fields would be highlighted upon a call to VSHOWFORM. No information regarding which fields were found to be in error is passed to the program. With VPLUS version B.04.10, VGETFORMINFO has been enhanced to return information on all fields in error. The information may be used by the program if a special error routine is to be performed when a certain field is in error. The information buffer returned by VGETFORMINFO has been expanded to include a 16-word array. This 16-word array is a bit map of all the fields on the form and can accommodate the maximum of 256 field numbers. Field numbers may range from 1 to 256, although a form may have a maximum of 128 fields on the form. If the bit corresponding to the field is set to 1, the field is in error. To decode and set the bits, a new intrinsic called BITMAPCNV is available and documented in the VPLUS/V Reference Manual, Appendix I. There have been several enhancements to batch mode FORMSPEC. Chapter 7 of the VPLUS/V Reference Manual describes how to use batch mode FORMSPEC. Three new commands are available to the programmer:
To further enhance batch mode compiling in FORMSPEC, two new JCWs have been introduced: FORMSPECERRORJCW which indicates the count of the number of errors during a compile and FORMSPECWARNJCW which indicates the count of the number of warnings during a compile. Starting with VPLUS version B.04.15 which was introduced on MPE version G.01.04, 2627A and 2397A color terminal users may have forms displayed with specific colors defined for a field. VPLUS has defined eight color pairs which can be used to enhance fields, highlight fields in error, and display the window. Digits 1 through i correspond to the default color pairs. The color pairs are defined in Chapter 3 of the VPLUS/V Reference Manual. These color pairs can be used along with the normal enhancement set of H, I, B, U, S or NONE for field, error or window enhancements. To use the color enhancements, the formsfile must have an "X" in the HP2627 box in the TERMINAL/LANGUAGE SELECTION MENU in FORMSPEC. Prior to VPLUS version B.04.15, a field defined through FORMSPEC could not be changed in the program. Therefore, if a programmer decided that a field defined as a "REQUIRED" field type should now be considered a "DISPLAY" field type, this could not be done. With VCHANGEFIELD, this is now possible. This intrinsic dynamically alters a field on a form. The changes are temporary, and are not posted to the formsfile. Some of these changes are:
With VPLUS version B.04.20 introduced in MPE G.02.01, there is an MPE file called VENVCNTL.PUB.SYS which is opened and read on the VOPENTERM call. Currently, the VPLUS USER ENVIRONMENT CONTROL file can control two items when VOPENTERM is executed. Two options have been implemented for the user environment control file.
To implement a user environment control file for VPLUS, build the file:
Use any type of editor tool to place "1" in column 1 and/or column 2. When VOPENTERM executes, it looks for the user environment control file. If it doesn't find it, VPLUS operates as usual. If the file exists and columns 1 and/or 2 are set, VPLUS will perform the abbreviated terminal query and/or the enabling of keys, depending on what columns are set. It is also possible to have a VENVCNTL file in a different group and account than PUB.SYS. If the file is in another group and account, this file equation is necessary:
For more information on how to implement the features, refer to the VPLUS/V Reference Manual. |
|