	     Midwest Fox Pros, Inc. Newsletter for October 1994
			     (CompuServe Edition)

From the Editor                      
 This is the first time that we have not had a place to meet.  The Johnson
 County Community College has been very accommodating in the past and have
 usually been able to provide us with a room.  Even a change in dates this
 month could not get us a room.  Kelly is trying to find an alternative
 place for us to meet.  It may require changing the date to the 18th.  If
 any member knows of a facility that could accommodate 50 -60 people that
 we could use as an alternative meeting place, please call Kelly at 525-8601.   Even if the facility is not available for our meeting this month we would like to know if it could be reserved for future meetings.  Location is important as we have members coming from all points in the greater Kansas City area as well as Lawrence and Joplin.

Coming Fox Pros Mtg

 6:30 - 7:00  Registration and Checkin.
All members and visitors must check in.  New memberships and renewals will
be taken at this time.  Members bring your ID cards for faster validation.

6:30 - 7:15  User's Forum
Users of FoxPro have the opportunity to ask the experts questions of a
non-developmental nature.  The focus in on new and novice users.

7:15 - 7:30  Business   Executive Board and Committee chairs present news
and reports and field questions from the members.

7:30 - 8:10 Presentation. Integrated Browse by Brett Duvall

8:10 - 8:20  Break

8:20 - 8:50 Presentation.  MultiScreen Sets by Chris Caviness.

8:50  -  9:00  Break

9:00 - 10:00  Developers Exchange Session.
Discussion of advanced issues and topics related to FoxPro and database
management.

The Midwest Fox Pros
Executive Staff  
 President ..................Kelly Conway      - 525-8601
 Vice-President .........Brett Duvall          - 792-4896
 Secretary .................Carolyn Patterson  - 492-7071
 Treasurer ................Brad Young          - 454-4441 
 
Committee Chairs

BBS ..............................Brett Duvall    - 792-4896
Events  .........................Andy Carey       - 833-2406
Membership  ................Del Bethke            - 422-7774
Technical Resources..... Chris Caviness           - 252-4617
Newsletter ................... Don Remen          - 436-9246


Membership Information
  
Our membership now stands at 103.  Memberships are $36.00 annually. 
Corporate memberships are also available.  Members of the Midwest FoxPros
receive Fox Bytes, our monthly newsletter, as well as access to our
Bulletin Board System (BBS).  




		  From the President

Have you ever noticed that FoxPro (and xBase languages in general) has a
huge programming language? It takes quite a while to learn about all of
the commands that are available. Just when you think you have those down,
a new version appears and several more commands are added.

The benefit of having all of these commands is that we can do just about
anything in FoxPro. The down side (in addition to the learning curve) is
that there are several ways of accomplishing any one task with FoxPro.
Some are elegantly simple. Others are horribly complex. Ask three Fox
Programmers how to do a simple task and you may get 4 or more opinions.
Pick up two FoxPro programming books from two different authors and you
might think they are talking about two different programming languages.

What is the point of my dreary story? The point is that if you are new to
FoxPro or are evaluating it against some other development environment,
you may quickly become overwhelmed by the size of the language and the
complexity that seems to be associated with doing certain  things
(one-to-many data entry screens for example).  Don't be frustrated and
don't be too quick to eschew FoxPro for one of those other development
environments that "looks cuter" and lets you get started more quickly
(remember that being able to finish a project is much more important than
how quickly you can get started).

Instead, I recommend that you understand that you will not become the best
FoxPro developer in a week and you probably won't even finish your first
project without getting some help. That's OK. There are several resources
you may use to help you learn more quickly. Every good developer I know has
learned FoxPro by using one or  more of the following resources: books,
magazines, training, conferences and the CompuServe FoxForum.  Several of
us can give you specific advice regarding these resources.

The Midwest Fox Pros User Group meetings and newsletter articles are another
learning resource. But I still think that the majority of our members see
the group as a once-a-month (or maybe even a once-a-year) resource. Nothing
could be further from the truth. Several methods are available to allow
group members to stay in touch throughout the month.

The BBS never has seen much action. However, a handful of people in the group
find it an invaluable resource where they can ask a question today and
receive an answer or two almost immediately (usually within 24 hours). The
group information line is an answering machine that primarily is used to
announce meeting schedules and changes. However, since it is an answering
machine, you can call and leave a message that you need help. One of  the
group leaders will respond to those messages the next day or so. If you need
a response more quickly than that, you should always feel free to call me
directly. You may also want to consider signing up for our mentoring 
program. That program is getting off to a slow start, but I  believe it
will prove valuable to all who participate  (mentors included).

I hope I have convinced you that there is no reason to wait until the
monthly meeting to get your pressing FoxPro questions answered. The more we
share information between meetings, the more contacts we make and the better
developers we all become. In the next month, I hope to announce yet another
resource that will offer members the chance to stay in touch and help each
other throughout the month. More on that next time.


Kelly


WANT ADS

Advertising in Fox Bytes can benefit your business.  We reach an audience
that is very specific, allowing you to costeffectively target your market.
The standard ad is 3.5" x 4.5" in size.  Please call  Kelly Conway, or
Don Remen for listings.

	  Rates:          Members:   $2.50 per month

		       Non-members:  $10.00 per month

We are also more than happy to place buy or sell, help-wanted, or situation-
wanted ads at no cost to our members.

Incremental Search Using Browse and JKEY
			  By Kelly Conway

During the August meeting, we had at least a brief discussion about
incremental searches. An incremental search is a function through which
a user may select a record by keying in a portion of one field in the
record.  For example, I could key "SMITH" in an incremental search to find
a customer whose last name is (or begins with) Smith. The user interface for
most incremental searches is a list that scrolls to display the first record
that matches the information I have entered. The FoxPro list box screen
object provides this functionality. However, the response from this type of
list box becomes too slow on most machines when about 1,000+ records are
in the list.

The best solutions I have tried are a couple of FoxPro function libraries,
written in C. The two libraries I have tried are George Goley's (MEI)
L3Srch and Joe Gotthelf's JKEY. You will need to buy Goley's book or attend
an MEI FoxPro class to get L3Srch. JKEY is a shareware product that is
available from our BBS or from the CompuServe FoxForum. Because it is
shareware and is in widespread use, I chose to write about JKEY in this
article. Each of the libraries is reported to work on DOS, Windows and
Macintosh. I have used both libraries in DOS and Windows and each works
very well with only slight differences in functionality. In the testing I
have done, JKEY showed no signs of slowing down (response still was
instantaneous) at over 130,000 records.

The first step is to get JKEY. As I wrote above, JKEY is a shareware FoxPro
function library written by Joe Gotthelf.  You can download JKEY from our
BBS or from the CompuServe FoxForum. The name of the self-extracting archive
that I downloaded is JKEY25.EXE. There may or may not be a newer version than 
that. If you're not modem-friendly, try bumming a copy off of me or someone
else at the next meeting (bring a disk, please).  After you get it, start
using it and wonder how you ever lived without it, please remember that it
is shareware. Joe does not solicit a set amount, but does give you an 
incentive to send at least $30. For that fee, he will notify you of future
JKEY updates.

Once you have gotten JKEY and copied it to a directory on your hard drive
(I like to put utilities such as this in a subdirectory I call FPTOOLS, but
it doesn't really matter where you put it), you probably will want to read
through the file named JKEY.DOC. It is an ASCII text file that tells you
how to use JKEY. If you read it or look at the sample program named
JKEYSAMP.PRG, you probably won't need the rest of this article. But since
I know that many of you are like me and won't read the documentation, I'll
continue.

As I wrote earlier, JKEY is a FoxPro function library. You access the
functions contained in the library by using the same FoxPro command that you
might use for other  function libraries -- SET LIBRARY TO <library>. In this
case, you will need to issue the command SET LIBRARY TO JKEY. Make sure that
JKEY either is in the current directory or is in your FoxPro path (e.g., SET
PATH TO \FPTOOLS). Alternatively, you could specify the full path to the
JKEY library in the SET LIBRARY command.  Note that FoxPro for DOS will use
the file JKEY.PLB,  FoxPro for Windows will use JKEY.FLL and FoxPro for
Macintosh will use JKEY.MLB.

After you have issued the SET LIBRARY command above, all functions contained
in the JKEY library are available. You can see a list of the available
functions by entering the command LIST STATUS in the command window. The
last section of this display lists the functions contained in the JKEY
library. Notice that JKEY contains five functions, only four of which you
ever would call (the fifth is called automatically when you unload the JKEY
library by issuing the SET LIBRARY TO or RELEASE LIBRARY JKEY commands or by
quitting FoxPro).

Before calling any of the JKEY functions, you will need to open a database
table and designate in which order the records should be displayed. JKEY only 
will seek for records by the current table order.

The first function to call is JKEYINIT(). That function initializes JKEY so
that subsequent key strokes are trapped by JKEY and used as a search key.
After initializing JKEY, you then issue the BROWSE command to display desired 
table fields. Any valid BROWSE command will work. Keystrokes made while the
BROWSE window is active will position the cursor on the record that begins
with what you enter (notice that upper/lowercase matters unless you pass "U" 
as the first parameter to JKEYINIT). After you have found the desired record, 
you can close the BROWSE window in any of the usual ways. After the BROWSE 
command, call the JKEYCANC() function to cancel JKEY's key trapping and
searching.

When you are finished using JKEY you also can remove the library from memory
by issuing either of the SET LIBRARY TO or RELEASE LIBRARY KEY commands.
However, it is a good idea to release the library only when you are ready to
quit FoxPro or your application. Repeated loading and unloading of any
library is known to cause FoxPro crashes. Besides, the library only takes up
about 4K of memory or so.

The FoxPro code below is an example of how to use JKEY. It is a simple
example to get you going. JKEY.DOC describes optional parameters that you
may pass to the JKEYINIT function to change JKEY's behavior. For example,
you can tell JKEY to convert all entered text to upper, lower or proper case. 
After you have the simple example below working, you may want to refer to
JKEY.DOC to see the more advanced options that are available.

Note: Before executing the example below, I executed the following two
commands to add a new index tag to the customer database contained in the
tutorial that comes with FoxPro. You will need to do the same if you want to
run the example below.

      use c:\fpw26\tutorial\customer exclusive
      INDEX ON company TAG Company ADDITIVE

Now for the JKEY example.

       *-- Use the FoxPro tutorial customer database and set 
the order to be by company name.

       use c:\fpw26\tutorial\customer order company

       *-- Load the JKEY library into memory
	     set library to \fptools\jkey additive

       *-- Initialize JKEY
	=jkeyinit()

       *-- Show a BROWSE list of the tutorial customers 
and allow incremental searching.

       browse fields company, city, state

       *-- Stop JKEY from trapping future keystrokes
	=jkeycanc()

       *-- Remove the JKEY library from memory
	release library jkey

	return

If you experiment with JKEY or George's l3Srch, I think you will find that
they will make a good addition your FoxPro toolbox. As always, let me know
if you have any questions.


Network Installation!
From cable installation to software loading.
All cabling tested and certified.   3 yr warranty.

Contact Jim Thornton  
      Home - (816) 792-3466
      Work - (913) 339-0828 


BULLETIN BOARD NEWS

BBS dial-up (816) 525-3692
    If problems are encountered in accessing the system, 
contact Brett Duvall (816) 792-4896.
     Initial modem settings to access the BBS are 2400/
4800 N 8 1, with the handshake set to Xon/Xoff.

Information Line
      To keep abreast of the latest schedule changes, call the 
Information Line (816) 525-4050.
