Data Entry in Clipper 5.2x:  User Interface Issues and Possibilities
--------------------------------------------------------------------
CA-Technicon '93

Addenda and Notes
-----------------

Two applications were presented.  The first was our demonstration of using
the 'cargo' instance variable to produce virtually the same results as our
second application, which presented a more purely object-oriented approach
to data entry.  For reference, here's a list of SET KEYs active during
each:

First application (KOLTERMN.EXE/ZIP)
------------------------------------
F1  - Field sensitive help.
F5  - Jump to any get via user input.
F10 - Jump to top/bottom of getlist.
PgUP- Previous page of GETs.
PgDN- Next page of GETs.

Second application (KOLTCLAS.EXE/ZIP)
-------------------------------------
The above, and...
F2        - view GET's source code.
F3        - picklist of source code files.
F9        - write to disk?
Ctrl-PgUP - skip to previous record; refresh getlist.
Ctrl-PgDN - skip to next record    ; refresh getlist.

The 'GET FIELD <nField>' user-defined command (and the corresponding
FLDGET) is completely undocumented in the session paper.  This is because
it was added after the deadline for the paper.  It introduces the concept
of using a GET instance variable as the GET variable, instead of the usual
external array element or single variable.  This is a technique, by the
way, that could be employed with any GET.

The 'ABOVE' clause has been added to the user-defined command for the
standard text GET.  It permits the positioning of a GET's 'title' on a row
above the GET's row, instead of on the same row immediately preceding the
GET itself.  It only appears in the standard text GET UDC, but could just
as easily be added to any of the other GETs.

A 'MESSAGE INFO' clause has been added to all UDCs.  It permits the display
of some descriptive or help text for each GET.  It's implemented via two
methods :dispMsg() and :clearMsg() in BASEGET.PRG.

An instance variable, 'endDisp', (again, undocumented) is introduced as a
way to prevent a GET from "flickering" when initialized.  Only a problem
when the first GET of a getlist or a single GET is initialized and READ,
flickering occurs because, in the standard '@ GET' command, the GET is
first displayed in the unselected color and then again in the selected
color during :setFocus().  The technique to eliminate the flicker:

   DispBegin()
   // perhaps a box frames the GET.
   @ 5,5 SAY "Normal text" GET cText
   getlist[1]:endDisp:= .T.
   READ

   // and now in the reader, the method :checkDisp() (BASEGET.PRG) looks
   // for a .T. :endDisp, and issues 'DispEnd()'.

See Main() in KOLTERMN.PRG for actual usage.

In the Password GET, an instance variable 'maxTries' has been added.  This
allows you to compare the number of times your postblock has returned .F.
with :maxTries, and to act accordingly...usually to end the READ or the
program.  See PWValid() in KOLTERMN.PRG for actual usage.

I've included unselected radio buttons with both *no* on-screen appearance
and the appearance of a blank space.  This is mainly a result of my not
being able to decide what looked best.  Radio buttons, in my view, only
become an appealing interface alternative under text mode redefinition
(TMR), where they can be easily represented via a small empty circle.

Credit for the .ASM module which permits redesign of the mouse cursor as
any ASCII character goes to Ken Lawrence.  He published "Adding Mouse
Support to Clipper" in the now-defunct "Compass Monthly", June 1992.  He
can be reached at 43210 Gingham Ave., Suite 6, Lancaster, CA  93535,
telephone 805-277-4515.  Thanks again, Ken.

In the paper, reference is made to a file named MOUSE.CH.  The correct file
name is SK_MOUSE.CH.

Apologies for the things I forgot, and therefore forgot to add here.  No
doubt, we'll come across them as we progress through the session.

Anyone wishing a copy of the source code which offers a more purely OO
implementation of the demonstrated techniques (KOLTCLAS.ZIP) can make a
copy from a master in the lab, or download KOLTCL.ZIP from Compuserve's
CLIPPER forum, library 2.

Errata
------

In the session paper under the section, "Using a mouse", the following code
within the 'WHILE Nextkey()==0' loop

          IF oGet==oGet:GETLIST[nGet]
             SetPos( nR, nC )

should be:

          IF oGet==oGet:GETLIST[nGet]
             GetMousePos( oGet,nC )

SetPos() produces the change in cursor position, but because it ignores
the GET's 'pos' i-var, subsequent keystrokes are misinterpreted. 
GetMousePos() correctly adjusts 'pos'.

-Steve Kolterman  [CIS: 76320,37]

============================================================================
The above line are all below are notes for the word processor only and NOT
to be included in the text of this handout.

---------   indicates underlying.
