Dec 132017
 
An excellent Foxpro programmers utility by Fred Wampler.
File DEVIL001.ZIP from The Programmer’s Corner in
Category Dbase Source Code
An excellent Foxpro programmers utility by Fred Wampler.
File Name File Size Zip Size Zip Type
HELPER.DOC 12505 3735 deflated
HELPER.FXP 10803 10803 stored

Download File DEVIL001.ZIP Here

Contents of the HELPER.DOC file


HELPER.DOC

Reference: "Programmer's Devil", November 1990 issue of
FoxTalk

In the November issue of FoxTalk Richard Grossman of TECH
III published an article describing a programmer's program.
That is a program to help programmers. He requested a
write-in to solve the problem of correctly selecting the
active (running) program for editing, even if it were a
procedure within another program. I accepted the challenge
and came up with a very good method which I forwarded to
Richard. Also, I wrote a procedure, among others, to handle
editing active databases in the same manner. Here is the
program I am using now. It was written from scratch and is
completely independent of Richards, other than for his neat
idea! (I do not believe ideas can be copyrighted.) The
compiled program may be used freely. Source code will be
provided for $15. VISA and MC are accepted. PH (615)247-6674

DESCRIPTION

HELPER can be called as follows:

ON KEY LABEL CTRL-ENTER DO helper with ;
TYPE('helper')=[U],ALIAS()

The first parameter prevents HELPER from calling itself, the
second parameter allows helper to initially highlight the
currently selected workarea when that selection menu is
presented.

HELPER can be popped-up over any running program to allow
editing of that program or any program in the program
hierarchy or any open database. The free-form command can
be used with display status to view database and index
status, or display memory to view memory variables or any
other suitable free-form command. SYS functions (Fig 4) and
SET STATUS (Fig 5) can be selected to show their active
values in a scrollable window. COLOR (Fig 6) can be used to
select another color set while the program is running.

The main menu for HELPER is shown in Figure 1. Options I have
incorporated to date are:

1. Active programs.
2. Active workareas.
3. Free-form commands.
4. Filer.
5. File handling, DF, Sweep, etc.
6. File locator, eg. FFF.
7. View SYS functions settings.
8. View SET STATUS settings.
9. Select and activate a color scheme from the active resource file.
10. Separate and build files (within a subdirectory) into two
procedure files, application and library.
11. Write current color set to strings.
12. Toggle to clear background (for free-form commands, etc.)


A description for the above categories follows.

Active programs. Figure 2 shows an example screen captured
by QEDIT (Tsr). The active-program list is shown in a
scrolling menu with the "desired" editable program
highlighted and any procedure listed beneath it. However,
editing is not limited to that program alone. Any program
having after it can be edited. If a program has
after it, it cannot be edited and HELPER does not
attempt to do so. The active procedure (not directly
callable since it is under another file name) when HELPER
was called is the last one in the list. In Fig 2, FEDIT
is a procedure located in VPORT . Any program
that cannot be edited by name is, for the purposes of the
HELPER program, a procedure. Programs found on disk ending
with .PRG are considered to be files. The file can be
edited by highlighting it and pressing enter. Escape aborts
the selection.

Active Workareas. A sample screen displaying the active
workarea option is shown in Fig 3. Both the currently
active workarea and database are shown highlighted. Any
workarea can be selected by highlighting it and pressing
enter. The selected workarea is kept active until either
another workarea is selected or HELPER is exited and the
original workarea is restored. While the workarea is active,
various operations can be performed on the database located
there by using the free-form option. For example display
status, modi stru or list stru, browse, etc. The background
screen can be toggled to a clear background (full-screen
window) for use with the free-form option or back to the
original background as needed.

Free-form. The free-form option is useful to the
programmer-user. The system options can be reached from
here by pressing ALT. Eject would eject a page from the
printer. SET options and many others are easily entered
here.

Other options. Other menuing options are specific to me and
will not be discussed.

Fred Wampler Ph (615)247-6674
Rt 3 Box 272
Church Hill TN 37642

================================================================
Fig 1. HELPER Main Menu.

System File Edit Database Record Program Window


HELPER

ACTIVE PROGRAMS
ACTIVE DATABASES
FREE-FORM
FILER
SWEEP
LOCATE FILE
SYS Functions
SET STATUS
COLOR
LIBRARY
FoxPro 1.02 COLOR STRING 989,1990 U.S./Canadian Edition
XPD101 Command

TOGGLE WINDOW
QUIT


Display active programs.

Fig 2. Active File or Procedure Screen


F1-HELP F5-FIND ENTER to Select ESC to Abort
EDIT (Esc ABORT ^W ACCEP
Company Custom Programming
Select File Phone (615)247-6674
PLEDGE_M First Joe C.
PLEDGE Last Staples, Jr.
->VPORT Lastcalled11/16/90
FEDIT
Committee Computer
Birthday 02/02/51
Note memo

Select Contributor
Company Phone First Last Las

Custom Programming (615)247-6674Joe C. Staples, Jr. 11/
Dog Bones Inc (615)247-6674Princess Wampler /
Fixit (615)247-6674Stephen Wampler /
Jean's Typing Servi(615)247-6674Jean S. Wampler 10/


Fig 3. Active Workarea Sceen

F1-HELP F5-FIND ENTER to Select ESC to Abort
EDIT (Esc ABORT ^W ACCE
Company Custom Programming
Select File Phone (615)247-6674
COMPANY COMPANY.DBF First Joe C.
REQUEST REQUEST.DBF Last Staples, Jr.
MEMBER MEMBER.DBF Lastcalled11/16/90
ARCHIVE ARCHIVE.DBF
->E 0B0D0A42.DBF Committee Computer
Birthday 02/02/51
Note memo

Select Contributor
Company Phone First Last La

Custom Programming (615)247-6674Joe C. Staples, Jr. 11
Dog Bones Inc (615)247-6674Princess Wampler
Fixit (615)247-6674Stephen Wampler
Jean's Typing Servi(615)247-6674Jean S. Wampler 10

Fig 4. Example of SYS Functions

System File Edit Database Record Program Window

SYS() STATUS
Printer status...........:READY
Exec Prog:PROCEDURE SYSCHK D:\FOXPRO\HELPER.FXP
Processor in use.........:80386
ON KEY = editing field...:
Alias()..................:
Database.:
Filter.:
Master index number......:0
Master index expr:
FoxPro EMS memory usage..:16
EMS memory limit.........:
Current CONSOLE setting..:ON
Current DEVICE setting...:SCREEN .S./Canadian Edition
Current PRINTER setting..:OFF Command
Current TALK setting.....:OFF
FoxPro's MEMORY..........:259344
User objects memory use..:59952


Fig 5. Example of SET Status

System File Edit Database Record Program Window

SET STATUS
Exclusive:ON
Fields...:OFF
Filter:
Fixed....:OFF
Fullpath.:ON
Heading..:ON
Help.....:ON
History..:ON
Hours....:12
Intensity:ON
Margin...:0
Mark.....:
Memowidth:50 ox Software 1989,1990 U.S./Canadian Edition
Menu.....:ON
Message..:24
Mouse....:7
Near.....:OFF


Fig 6. Color Selection Screen

System File Edit Database Record Program Window
Select
COMPQ_COLO
COMPQ_MONO
E_EDIT
E_FALL
E_FALLB
E_GRAYHI
E_KERRY
E_PARIS
E_PATRIOT
E_SPRING
E_SUMMER
E_WINTER
FoxPro 1.02 (c) Fox Software 1989,1990 U.S./CanadE_WINTER2
CMONOCHROME
T5200_COLO
T5200_MONO
TOSH_3200



 December 13, 2017  Add comments

Leave a Reply