[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function DOITALL()
Action Generic menu driven data entry module
Returns
Category Metafunction
Syntax DOITALL([array1],[array2],[array3],[array4])
Description Presents a menu driven data entry screen for
the current dbf, with options for Next Previous
Search Lookup Edit Add Delete and Other.
By default uses all fields in the current
DBF, but may be passed two arrays
to restrict field access:
Options Optional Parameters are:
1. Array of options for 'Other' menu
2. Procs to perform to match these options
3. Array of field names
4. Array of field descriptions
Both arrays 1 and 2 must be passed if one is passed.
Both arrays 3 and 4 must be passed if one is passed.
Last menu item must be QUIT or EXIT. An exit
from the OTHER menu is performed if the last
item is selected.
Examples
use Customer index Customer
Doitall()
* or....
use Customer index Customer
private a1[3],a2[3]
a1[1]= "Query"
a1[2]= "Print"
a1[3]= "Quit"
EXTERNAL QUERY,LISTER
a2[1]= "QUERY" && call QUERY()
a2[2]= "LISTER" && call LISTER()
a2[3]= " " && NOTE: no parentheses.
DOITALL(m->a1,m->a2)
* or with optional field arrays.....
declare useflds[3],flddesc[3]
useflds[1]="LAST"
useflds[2]="FIRST"
useflds[3]="MI"
flddesc[1]="Last Name"
flddesc[2]="First Name"
flddesc[3]="Middle Init"
DOITALL(m->a1,m->a2,m->useflds,m->flddesc)
Notes
I would use this, normally, if my program was
not going to know ahead of time what a dbf might
look like - or even what dbf will be used.
Obviously if you know what your dbf is going to
look like you can come up with a slicker, customized
interface.
DOITALL() takes over the PGUP PGDN keys during
its menu phase by SETing KEYs to them. So be
careful of any popup procs you may be using - PGUP
and PGDN will not be available.
If passing arrays for the OTHER menu, be sure the
procs to be called are known to the compiler, either
by being called elsewhere in the program, or by
using EXTERNAL. (see above)
Warnings Key -9 is unset on exit (F10), Cusor is left ON.
Found in (prg)......S_DOALL.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson