home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR7
/
FOXTAILS.ZIP
/
FOXTAILS.DOC
< prev
next >
Wrap
Text File
|
1992-06-13
|
22KB
|
684 lines
█▀▀▀▀ █ █ ██
█▀▀ ▄▄▄▄ █ █ ▄█▄ ▄▄▄▄ ▄ █ ▄▄▄▄ ▄█▄█▄ █
█ █ █ █ █ ▄▄▄█ ▄ █ █▄▄▄ ▄█▄█▄ █
█ █▄▄█ █ █ █ █▄▄█ █ █ ▄▄▄█ ▀ ▀ ███
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Copyright 1992 by dbF Software Productions
Ever wonder how we do our FoxPro stuff? Well, so do we sometimes.
But FoxTails is a great place to start. 10 programming tools and UDF's
are included, with source code. They're all liberally commented,
documented with samples. Admit it, Fox Pros, haven't you
ever wanted to:
Validate GET's using Popup's easily and quickly
Convert data to Word Perfect MailMerge
Enter Keyboard stuff using your mouse
Do wonderful signs like we use?
Use a calendar format for Date entry (yes, DATE entry)
Easily display report files
... and more!!
Well, FoxTails are some simple, clever tools to do just that, and
for only $25! Plus, registered FoxTail users get 1st (free) crack at
FoxTails #2!
Order a pre-registered copy today.........................
We'd like to hope that you see some potential uses for these tools.
We also hope that you recognize the fact that you're using
SHAREWARE, and therefor have a moral and legal responsibility
to register this software if you find it helpful. At $25, ya
gotta admit it's a small price to pay for a clear conscience.
And we'll make sure you get the next batch (FoxTails #2 - the
Toolkit's Revenge) when they're hot off the presses. At the
rate these are rolling out, they should be ready by June or
July.
Around the same time, look for our 1st dBase IV ToolKit,
"dBaseX #1."
To Register, send $25(US) to:
╔══════════════════════════════╗
║ ║
║ dbF Software Productions ║
║ P.O. Box 37194 ║
║ Cleve., Ohio 44137-0194 ║
║ CIS: 72117,165 ║
║ (216)491-4581 ║
║ Member ASP ║
║ ║
╚══════════════════════════════╝
System Requirements:
FoxTails #1 requires a system with a working copy of FoxPro
Version 2.0. Certain tools (Lookup or Pickpop with large
databases) work best with a 386 or better based system.
FoxTails are not initially compiled, to take less space.
Fox will automatically compile them when they are 1st used.
All FoxTails can be used separate to each other, and do not
require all of FoxTails to be installed or accessible.
Installation:
FoxTails is distributed as Shareware. Simply Unzip the
file FTail1.Zip in a directory (preferably by itself initially),
and start it using the following command:
FOX Foxtails <Enter>
An Installation batch file (INSTALL.BAT) is provided for
registered users to do this automatically.
Error Handling:
Very little error handling is performed by FoxTails, since
they are programming tools, and not intended for end users.
It's important for the programmer using them to take care to
use them properly. Use the documentation, sample code and
help file to learn the ins and outs properly.
Support:
Technical Support can only be provided to registered users
of FoxTails. To register your copy, please send $25(US) to:
dbF Software Productions
PO Box 37194
Cleveland, Ohio
44137-0194
Please allow several weeks for delivery. All registered
FoxTail users will receive a shareware copy of FoxTails #2
when available.
Support is also provided through the CompuServe Information
System. Send Inquiries to 72117,165. We're usually hanging
around the Data Based Advisor, FoxForum and Borland Dbase areas.
(We're also now on Prodigy at XRCG88A)
FoxTail #1
╔══════════════════════════╗
║ ║
║ CPACK ║
║ ║
╚══════════════════════════╝
CPack will take information which has blanks
either left or right and pack that field with a
passed character. So if you had an order number
which is always preceded by 0's, CPack will pack
it as the user entered it (so a "345" on a
6-length field would become "000345").
You can use CPack in either a GET, a REPLACE or a
STORE.
Example:
@5,5 GET FVar VALID CPack(Pchar,What, Mem) PICTURE "XXXXXXXXXX"
Parameters:
PChr. What Character to Pack it with.
What. The field/memvar to be Cpacked. (Use only
in a STORE)
Mem. Is this a memory variable? (Use only if
it's a memvar)
If you're doing this to a database field during a
get, you can get (yuck-yuck) away with simply
CPACK(Pchr). A Cpack() will default the Pchr to "0".
FoxTail #2
╔══════════════════════════╗
║ ║
║ DBFIXED ║
║ ║
╚══════════════════════════╝
This program will help you import data files into
a dbF format. Files that have some kind of fixed
record length but with a header (ie, a Cobol data
file) length. You try finding (or already know)
combinations of record and
header lengths until you find one that fits...
For example, a Cobol file has a fixed record
length, except for the header. Trial and error
will let you find a working match of header and
record, which you can than approve and port to a
database.
There are no parameters for this.
For what it's worth, one of the identified tools
for Fox Tails #2 (Revenge of the Toolkit) is an
enhanced version of dbFixed that will have let the
user define the fields that the results should be
stored in.
See the registration help for information on how
to get your paws on Fox Tails #2.
FoxTail #3
╔══════════════════════════╗
║ ║
║ GET_DATE ║
║ ║
╚══════════════════════════╝
Get_date allows the user to point and click at a
Date which is displayed calendar-style. The only
parameter is the initial date to be used.
You can use Get_date in two ways. First, you can
use it for an original entry of a date. An
Example:
Dt = GET_Date(DATE())
Second, you can also call it as part of a VALID statement.
For that you would actually call the Valid statement
first, since GET_DATE does no real validation checking.
If the routine would usually return a false back to the
GET, call up GET_DATE as part of a loop. See the sample
to see how that's done. And be amazed.
FoxTail #4
╔══════════════════════════╗
║ ║
║ LOOKUP ║
║ ║
╚══════════════════════════╝
By far the most powerful and complex of the tools. Lookup
provides a whole platform for Power Seeks using the Browse
function, and let's the user launch into an activity from
within. Through the use of ON KEY LABELS you can create a
full range of actions to be taken.
You may notice some similarities here. There are really
two sources of inspiration here. First is an EXCELLENT
article written by the Great George Goley IV, in Data Based
Advisor some time back. Second is a template design in UI2,
part of the GENSYS system. But there are significant changes
to both of them.
You can nest Lookups, limited (we hope) by memory only. The
system takes care of that automatically, through use of the
NumLkp variable. Also, this is made to find a record and then
perform the next task WHILE REMAINING IN THE BROWSE, using OKL's.
DANGER, WILL ROBINSON!!!
This Critter is easy to break. How? The most common errors
(not by us, of course...we're perfect):
1> Improper Browse statements as part of the parameter
list (includes databases not set up, etc.)
2> Multi-user access of the Junk database (fairly easy
to add on to, but it'll make it more convoluted...later, perhaps?).
3> Remember when you launch into your subsequent functions
to take care of your OKL's and retain the database situations
(index, relations, etc.).
4> Speed...this can be dead slow like a wiener dog on an AT.
It's pretty good on a faster machine...
The Parameters? Hold onto your hats, here they are:
PARAMETER Ttlstr, Fldlist, Defsrch, Toprow,
Topcol, botrow, Botcol, Db, Ldb, Exwin, key1, key2
TtlStr String for Title Line of Browse Box
Fldlist Browse Field List in FoxPro Format
Defsrch Beginning Default Search
Toprow Top Row (relative) of Box
Topcol Top Column (relative) of Box
Botrow Bottom Row (relative) of Box
Botcol Bottom Column (relative) of Box
db Database Alias to be in use after lookup
ldb Database Alias to be in use during lookup
Exwin Window to activate upon exit
Key1 For Scoping (limiting) the scroll...
Beginning value of index or Scope
Key2 For Scoping (limiting) the scroll...
Ending value of index or Scope
Now, how do you call this magical beast? You do so by
STRICTLY ADHERING to the following:
1: Define variable Numlkp = "0" (Counter)
2: Open databases, set relations, etc.
3: Define the window where it takes place
4: Activate said window, display information
5: Define any OKL's that are to take place
6: Call Lokup with the proper parameters
7: Release (reset) OKL's
8: Release Window
#1:
Numlkp = "0"
#2:
SELECT A
USE Account ORDER Name IN A
USE Policy ORDER Acct IN B
SET RELATION TO Acc_Pnum INTO Policy
#3:
DEFINE WINDOW Acc_Lookup FROM 17, 0 TO 22, 66
FLOAT
#4:
ACTIVATE WINDOW Acc_Lookup
@ 0, 1 SAY "<F1> - Lookup Help"
@ 1, 1 SAY "<F2> - Edit Account"
@ 2, 1 SAY "<F3> - Policy (1-Many) Lookup"
@ 3, 1 SAY "Account Lookup Screen - Tap <Esc> to
Exit"
#5:
PUSH KEY
ON KEY LABEL F1 DO Hlp
ON KEY LABEL F2 DO Edt
ON KEY LABEL F3 DO Pol
#6:
DO Lokup WITH "Accounts",'ACCOUNT.ACC_NAME:H="Account Name",;
ACCOUNT.ACC_PNUM:H="Acc #",ACCOUNT.ACC_STATE:H="State",;
Fnd=FOUND("Policy"):H="Policy"','',5,0,16,70,ALIAS(),;
'ACCOUNT','','NONE','NONE'
#7:
POP KEY
#8:
RELEASE WINDOW Acc_lookup
Now, what exactly are we doing? We're creating a way to
select a record from a database and "launch" into another
task, using the Browse feature. The 3 OKL's define the
tasks to be launched into.
FoxTail #5
╔══════════════════════════╗
║ ║
║ MKEY ║
║ ║
╚══════════════════════════╝
Program MKey, allows a user to actually perform a majority
of data entry using just the mouse.
Now, why would someone want to do that? Well, as a true
couch potato, I could try to claim some level of
slouch-saving doing this.
More importantly (and seriously), it shows how relatively
simple it is to maximize the capabilities of the computer
for someone who is physically challenged (or whatever the
current "politically correct" term is these days) to
access programs already written.
There are other situations where access to the keyboard is
limited, I suppose. Like when my wife hides it from me.
Now, how would you use this program?
Welllll....like this:
The key thing is to include Mkey(Var, length) in any VALID
statement so that it would be called. It would also help
to initialize an OKL so that the Right mouse button would
call Mkey. This would allow the program to be called
whenever the user tapped the button. This is how you would
perform Mkey during GET's:
ON KEY LABEL RIGHTMOUSE DO Mkey WITH "","",.T.,0
For an original data entry, you'd use:
Dt = Mkey("Dt",DATE())
You don't need the 3rd and 4th parameter this example,
since 3> it isn't a GET statement, and 4> a date has a length of 8, period.
Simple, huh?
Well, there are some limitations. They are as
follows:
1> Memo field probably won't work too well here.
We could have included them, and perhaps will in a
subsequent release. But they represent a
different colored horse story.
2> The field must have some kind of default
condition. If it doesn't, Fox will give it a
Logical field type, which is pretty useless.
The parameters are stated as such:
Mkey((<FieldC1>, <FieldC2> , <FieldL1> [,<FieldN>])
Where:
<FieldC1>: is the name of the field
<FieldC2>: is the initial starting value
<FieldL1>: is it a GET? (a .F. means it's a STORE)
<FieldN1>: is the maximum length (for Chr and
numeric only)
FoxTail #6
╔══════════════════════════╗
║ ║
║ PICKPOP ║
║ ║
╚══════════════════════════╝
Pickpop is a program that allows a programmer to
easily create unlimited validation POPUPs for a
GET statement that still looks like a normal GET
statement. It can also be used as part of a
STORE, or X=PICKPOP....there are several
parameters:
* Passed Parameters:
PICKPOP(<FieldC1>, <FieldC2>, <FieldC3>,
<FieldC4>, <FieldC5>, <FieldL1>, <FieldL2>)
Where:
<FieldC1>: is the name of the POPUP
<FieldC2>: is the name of the database that the popup uses
<FieldC3>: is the name of the CDX tag that the popup uses...
<FieldC4>: is the name of the field to be verified...
<FieldC5>: is the expression to be replaced from the POPUP.
<FieldL1>: is the expression to be validated a Field?
<FieldL2>: is this a variable STORE (as opposed to a GET)?
Remember, PICKPOP Requires that a Popup has been
DEFINED prior to the calling!
An example:
1> Define the popup:
DEFINE POPUP Title FROM 10,5 TO 13,32 PROMPT FIELD
Ttle TITLE "Choose one!"
ON SELECTION POPUP Title DEACTIVATE POPUP Title
2> Perform the Get:
@5,15 GET People.Title DEFAULT SPACE(25) VALID ;
Pickpop("Title","Title","Ttle","People.Title","Title.Ttle",.T.,.F.)
or, as part of a STORE (1st define the Popup as in Step 1:
S = ' ' <----define the variable before calling!!
S =
Pickpop("State","State","St_Code","S","State.St_name",.F.,.T.)
FoxTail #7
╔══════════════════════════╗
║ ║
║ REORG ║
║ ║
╚══════════════════════════╝
This program will recreate all generic Compound
Indexes for all open databases.
This program assumes the following:
All databases that you want indexed are currently
open and available for business (this means that
they are accessible in a multi-user situation)
That no index includes a relation in either the
CDX Tag's Expression or the FOR clause.
That all indexes are CDX Tags.
That none of the Tags are UNIQUE.
That you're a deserving boy or girl.
If any of these conditions exists, Reorg will make
trouble in your life!!
FoxTail #8
╔══════════════════════════╗
║ ║
║ SIGN ║
║ ║
╚══════════════════════════╝
SIGN is a function that will blow up the
characters of a user-supplied string into big
letters and scroll them about the screen. To call
SIGN, you pass the following parameters:
<FieldC1>, <FieldN1>, <FieldN2>, <FieldC2>,
<FieldN3>
Where: <FieldC1> is the string you want converted
<FieldN1>: is the vertical position (0-18)
<FieldN2>: is the horizontal position
(0-[79-9*LEN(<FieldC1>)])
<FieldC2>: Slide Direction: (T)op, (B)ottom,
(L)eft, (R)ight
<FieldN3>: Time delay (Seconds) between updates
Example:
We'll do "FERRET" (always a favourite, don't you
agree?) from 8,1 scrolling from the right with a
.1 second delay between updates
DO Sign WITH "FERRET", 8,1,"R",.1
FoxTail #9
╔══════════════════════════╗
║ ║
║ STEP ║
║ ║
╚══════════════════════════╝
Step lets the mouse take care of numeric, date or character
entry, by letting you place areas where striking that area
(an invisible button) would increase or decrease the numeric
value by a specified amount. You can also pass limits. So
you can create a place where the user can click through a 1-10
by 1, or an area where they go more gradually, by .125, if you
wish.
Called by:
Step(Vr,Stype,Mn,Mx,Stp,Fld)
Parameters:
Vr The name of the field to be stepped, not the name
of the field you're currently Validating
Stype The type of Stepping you wish to do.
C = Character
Y = Year
M = Month
W = Week
D = Day
Anything else is whatever the Stp value is.
Mn Minimum value for Dates and Numeric Steps.
Min is also the Position # (from left) of the
string you're modifying. So, for example if you
are working on:
"ABCDE"
your Mn value would be 4, since the position held by
the "D" is the 4th from the left.
Mx the Maximum value for Dates and Numeric Steps.
Stp Step amount. Usually 1, it tells the number to step by.
If you wanted to increment by 1/4, stp would be .25
Fld Is this a Field you're Stepping on? If so, send .T.
Example Code for Numeric Stepping:
@4,5 SAY "" && Marker for the Invisible Button #1
@6,5 SAY "" && Marker for the Invisible Button #2
* Invisible Button #1
@4,5 GET Inc FUNCTION '*I' SIZE 1,1,1 VALID Step("X","N",45,55,1,.F.) ;
DEFAULT 1 ERROR "Min of 1"
@5,5 GET X VALID BETWEEN(X,45,55) PICTURE "99"
* Invisible Button #2
@6,5 GET Dec FUNCTION '*I' SIZE 1,1,1 VALID Step("X","N",45,55,-1,.F.) ;
DEFAULT 1 ERROR "Max of 100"
We use the 2 invisible buttons to drive X
FoxTail #10
╔══════════════════════════╗
║ ║
║ WPCONV ║
║ ║
╚══════════════════════════╝
WpConv will take an array of database fields, functions,
memory variables or any of that good stuff and convert
them into fields that you can use in a Word Perfect
MailMerge file. This way you can create a mailing list
easily. Simply call the routine:
=WPCONV('<File Name>',@<Array Name>, [<FieldL1>], [<FieldC1>])
Where:= <File Name>
is the file that you want the results stored in,
and: <Array Name>
is the array that has all of the NAMES of
information you want stored (usually field names)
and: <FieldL1>
is whether you want a blank record to be the 1st
and: <FieldC1>
is the field-delimiting character (defaults to ',')
one created (this is optional, default is .F., or no)
###############################
#*****************************#
#* COMING ATTRACTIONS! *#
#*****************************#
###############################
FoxTails #2: The Toolkit's Revenge
FoxTails #2 will pick up where FoxTails #1 began, namely
by giving you the programmer even more tools to make
FoxPro work for you!
Some of the tools we're working on include:
ViewMaster:
Similar to CREATE VIEW xxx, but instead of a .VUE file,
creates a program which you can easily modify!
BrowBld:
Create complicated BROWSE statements through a menu, and
save them as either code or in a database for further use.
DbFixed2:
or, "Son of DbFixed." Takes up where dbFixed left off.
Direct Low-level I/O to specific database fields.
All of these tools and more, when FoxTails #2 makes its
debut!
Credits, Blame and Excuses...
FoxTails is written by R.L. Coppedge, with the exception
of Lookup, which is by R.L. Coppedge and Jerry Hare.
Documentation is by R.L. Coppedge, with help from Helen Coppedge
(thanx, dear).
Testing and final lookabouts by Jim Johnson.
Debugging and Beta help:
Susan M. Cunningham
Randy Wallin
Martin Schiff
Packaging and distribution by dbF Software Productions.
Fox, FoxPro are owned by Fox Holdings (lucky stiffs) or
Microsoft, depending on when you're reading this.
Word Perfect is owned by Word Perfect Corporation
dBase is owned by Borland International.
dbF Software Productions is a member of the Association of
Shareware Professionals.
Substantial Penalty for Early Withdrawal.
ASP Information:
This program is produced by a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that
the shareware principle works for you. If you are unable to
resolve a shareware-related problem with an ASP member by
contacting the member directly, ASP may be able to help.
The ASP Ombudsman can help you resolve a dispute or problem
with an ASP member, but does not provide technical support
for members' products. Please write to the ASP Ombudsman at
545 Grover Road, Muskegon, MI 49442 or send a CompuServe
message via CompuServe Mail to ASP Ombudsman 70007,3536.
DisClaimers:
THIS SOFTWARE AND MANUAL ARE SOLD 'AS IS' AND WITHOUT WARRANTIES
AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES
WHETHER EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS HARDWARE
AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PUT, NO
WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE
THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.
THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY
LIABILITY OF dbF SOFTWARE PRODUCTIONS ITS PRINCIPALS WILL BE
LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE
PRICE.