Dec 102017
Simple help system for Clipper programs. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
HELP.TXT | 3326 | 1474 | deflated |
Download File CLIPHELP.ZIP Here
Contents of the HELP.TXT file
The following code is an example of a help system for Clipper S87.
It uses a technique that I have not seen documented anywhere but
lends itself to this purpose quite nicely. With a seperate HELP
database, you can create very extensive context sensivtive help
systems for you applications and, with seeking on all three
varibles (P,L,V), a help screen can be located and displayed within
a second. Of course as the size of your help system grows so will
your index; disk space should be a consideration during development.
An explanation for the novice:
When the F1 key is pressed, the procedure HELP is looked for and
executed (It must be compiled and linked with the system). Three
parameters are passed: calling program (P), calling line (L), and
calling varible (V). You enter your HELP database and seek on the
concaction of these varibles. Lines 4-6 and 13-16 were put in to
run this procedure as a stand alone program. They are not needed
for an on-line help and have been commented out and are left in
only as a reference. When a match is found, the HELP screen is
displayed in the window defined with the fields top, left, bottom,
and right. The function memoedit is use in the non-update mode.
If a match is not found then a no help message is displayed (line 26).
A more appropriate window and message should replace line 26.
The HELP database structure should look like this:
FIELD NAME TYPE WIDTH
Call_Prg Char 10
Call_Line Char 4
Call_Var Char 10
Text Memo 10
Top Num 2
Left Num 2
Bottom Num 2
Right Num 2
and should be indexed on call_prg+call_line+call_var to HELP.NTX
An example of a record in this database might be:
Call_Prg ------MAIN
Call_Line --43
Call_Var -------ans
Text You must enter a yes or no response
Top -5
Left 35
Bottom -8
Right 65
the -'s represent leading blanks in the fields.
Please feel free to use and distribute this code anyway you wish.
Comments can be sent to me on COMPUSERVE 73767,1473.
Gary Light
1 PROCEDURE HELP
2 PARAMETER P,L,V
3
4 *P = SPACE(10)
5 *L = 0
6 *V = SPACE(10)
7
8 SET TALK OFF
9 SET EXACT OFF
10 frame = ""
11
12 CLEAR
13 *@ 4,10 SAY "ENTER PROGRAM " GET P PICTURE "!!!!!!!!!!"
14 *@ 5,10 SAY "ENTER LINE " GET L PICTURE "####"
15 *@ 6,10 SAY "ENTER VARIBLE " GET V PICTURE "!!!!!!!!!!"
16 READ
17
18 USE HELP INDEX HELP
19 seeker = p + str(l,4) + v
20 SEEK seeker
21
22 IF FOUND()
23 @ top,left,bottom,right BOX frame
24 memoedit(text,top+1,left+1,bottom-1,right-1,.F.)
25 ELSE
26 ? "NO HELP IS AVAILABLE"
27 WAIT
28 ENDIF
29
30 RETURN
31
December 10, 2017
Add comments