[There's also docs in portuguese (LEIA-ME). I'm a native portuguese speaker.]

How to install
--------------

The file "sqlforms" is the main program. It needs "pgtksh", a wish
interpreter with some postgresql add ons. You can get pgtksh with newer
PostgreSQL releases.
The first step in your installation is to make sqlforms' dir reachable, by
editing "sqlforms" executable and replacing the following:

set sld(dir) path/to/sqlforms/installation/dir

You must be sure also that the first line (with #! ) points to the correct
pgtksh program.

To use some nice fonts, try to get freefont distribution (comes with The
GIMP), but any postscript font is suitable, if it's in the .pfb format.
Don't forget to put the following in your .xinitrc:

xset fp+ /usr/X11/lib/fonts/freefont
xset fp rehash

You may also try other fonts you may have installed in your X, by changing
this list (in sqlforms):

set sld(fontfamilies) { my font-families }

If "makeWidgets" is not found, please go to sqlforms/lib dir and run MkIndex
to properly build the library index required by tcl.

I have run this program only on a Linux machine, but it may be ported to
others, if you have PostgreSQL and Tcl/tk installed.  Perhaps some keys
(Home,End, etc..) may have to be changed, by hand editing.



How to use sqlforms
-------------------


Select a database (Database-Database) at the top menu. You will get a list
of all postgres databases available to the current user.
Then, select a class (table) you are concerned. For instance, let there be
a "client" class.

You may put some "entries" (menu Object-entry) with button <1> of the mouse,
by clicking and dragging it.
If you want to change it's attributes, double-click middle mouse
button <2> to get a selection window.  The most important attribute is
at the top, the class attribute you are supposed to attach to this entry.
You may resize the object with the same button but at the lower-left corner
of the object, by clicking and dragging it to the new size.  
If nothing happens, try to change the snap (menu Options-snap) to a 
lower setting.  To move the object click in the center of the object (same
button <2>) and drag it to its new position.

The labeling of the objects is done by putting some text in the canvas,
(Object-text). First choose the font, font size, and foreground color.
Then drag the text to its final position.  You may also edit some properties
of all objects like you have done with entries above.

If you put some box (Object-box) and some objects disappear, try to send the
box to back (menu Edit-back).  You select the object by clicking it with the
middle mouse button.

When everithing is done, select (Object-no object) to avoid accidentally
inserting other objects and save your form (File-Save).

Some accelerators make your navigation throught the tables easier:

Alt-Home	retrieve, with some filtering, depending on the fiels (entries)
			contents, and navigation otpions.

Alt-End		clean form

Alt-Insert	record (a new one, if you cleaned it before, or update
			if you just changed a retrieved one

Alt-Delete	remove the current record (in the base class)

Alt-Left	go to previous record in a query

Alt-Right	go to next record in a query

Alt-Up		go to first retrieved record

Alt-Down	go to last record



If you are trying to use several tables at once, please select first a "base
class", and then insert several fields for several classes. Then you must
choose some relationship that "links" those classes. For instance, you may
have in the "client" class a field "city_code" and in the class "cities" you
may have a similar field (perhaps not with the same name, but the same
contents).  You will then select (Database-Relationships) and select in each
column one of the tables. Then click in each field related, both left and
right and press "make" button. Congratulations, your new relationship will
be listed just above the bottom buttons.
If your forget to make a relationship and make a query, you'll retrieve a
cartesian product of all classes' instances of the (2 or more) classes
listed in your form. (could be very large indeed!)


Please help
-----------

I am decide to make this a "very simple to use" database frontend to
PostgreSQL or other SQL servers.  If you are interested in helping, 
please do contact me by e-mail <rpragana@acm.org>.


Why tcl?
--------

Tcl is very simple, lisp-like language, very powerful, extendible, and have
several other good attributes to make it suitable for small to medium system
tasks. My code is surely ugly, not well structured, and need much rework,
but it was a pleasant way to get started with some "advanced" scripting in
tcl with the tk toolkit.   I could have used Tix, Blt or other extensions to
do some widgets, but it would make less portable to other users.


About myself
------------

I'm a physicist, working in electronics and computers for the last 22 years.
I was born and live in Recife, northeast of Brazil.  My current job is doing
consulting and developing hardware gadgets for someone else.  If you want my
biography, try the docs in "gscan" (ftp://sunsite.unc.edu
at the directory /pub/Linux/apps/graphics/capture).

