home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
t
/
tech91.zip
/
TI699.ASC
< prev
next >
Wrap
Text File
|
1991-08-26
|
3KB
|
133 lines
PRODUCT : Paradox NUMBER : 699
VERSION : 2.0 & up
OS : DOS
DATE : August 26, 1991 PAGE : 1/2
TITLE : Implementing Fieldview in a PAL Application
In a WAIT TABLE or WAIT RECORD statement that lists <Insert> and
<Delete> in its UNTIL clause, additional programming must be done
to process Fieldview correctly. While in WAIT TABLE or WAIT
RECORD the user can enter Fieldview by pressing <Alt-F5> or
<Ctrl-F>. Without additional programming, the following problem
will arise. When the user presses <Insert> or <Delete> while in
Fieldview, the Paradox code to handle <Insert> and <Delete> is
invoked causing Paradox to insert or delete a record rather
inserting or deleting a character.
In Fieldview mode, <Insert> and <Delete> should insert and delete
characters, and in Edit and Coedit mode, these keys should insert
and delete records.
The correct way to implement <Insert> and <Delete> in Fieldview
is to add Fieldview to the Until clause of the WAIT statement.
The following PAL program demonstrates this method.
===============================================================
COEDIT "Customer" ; Coedit the Customer Table
WHILE TRUE
WAIT RECORD
UNTIL "DO_IT!","FIELDVIEW","DEL","INS","PGUP","PGDN"
; Note Fieldview in above line
SWITCH
CASE RETVAL = "DO_IT!" : ; <Do_It!> pressed
DO_IT!
QUIT
CASE RETVAL = "FIELDVIEW" :
FIELDVIEW
; Fieldview handling code
; Invoke Fieldview, wait for Enter to be
pressed
WAIT FIELD
PROMPT "Press Enter to end fieldview",""
UNTIL "ENTER"
; User may insert and delete characters while
in
PRODUCT : Paradox NUMBER : 699
VERSION : 2.0 & up
OS : DOS
DATE : August 26, 1991 PAGE : 2/2
TITLE : Implementing Fieldview in a PAL Application
; Fieldview
OTHERWISE : ; Process other keys
KEYPRESS RETVAL
ENDSWITCH
ENDWHILE
===============================================================
This program places the "Customer" table into Coedit mode, then
uses WAIT RECORD to allow the user to edit the table until
<DO_IT!>, <FIELDVIEW>, <DELETE>, <INSERT>, <PGUP>, <PGDN> is
pressed. When the user enters Fieldview mode, by pressing <Alt-
F5> or <Ctrl-F>, the program uses a WAIT FIELD statement to allow
the user to make changes to the field. While in Fieldview the
user can press <INSERT> and <DELETE> to insert and delete
characters. When the user presses <Enter>, the Fieldview
terminates and returns to the WAIT TABLE statement allowing the
user to continue Coediting the table. When a user presses
<INSERT>, and <DELETE> in CoEdit mode, these keys insert and
delete records.