mirror of https://github.com/postgres/postgres
parent
c24ed70193
commit
8175eb3485
@ -0,0 +1,77 @@ |
|||||||
|
CREATE TABLE pga_queries (queryname varchar(64), querytype char(1), querycommand text); |
||||||
|
CREATE TABLE pga_forms (formname varchar(64), formsource text); |
||||||
|
CREATE TABLE pga_scripts (scriptname varchar(64), scriptsource text); |
||||||
|
CREATE TABLE pga_reports (reportname varchar(64), reportsource text, reportbody text, reportprocs text, reportoptions text); |
||||||
|
CREATE TABLE phonebook (name varchar(32), phone_nr varchar(16), city varchar(32), company bool, continent char16); |
||||||
|
CREATE TABLE pga_layout (tablename varchar(64), nrcols int2, colnames text, colwidth text); |
||||||
|
COPY pga_queries FROM stdin; |
||||||
|
\. |
||||||
|
COPY pga_forms FROM stdin; |
||||||
|
Phone book pb 26 {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26} 444x310+284+246 {label label1 {33 12 63 30} {} Name {}} {entry name_entry {87 9 217 30} {} entry2 pbqs(name)} {label label3 {33 39 73 54} {} Phone {}} {entry entry4 {87 36 195 57} {} entry4 pbqs(phone_nr)} {label label5 {33 66 78 84} {} City {}} {entry entry6 {87 63 195 84} {} entry6 pbqs(city)} {query qs {3 6 33 33} {} query7 {}} {button button8 {126 177 198 203} {.pb.qs:setsql "select oid,* from phonebook where name ~* '$what' order by name"\ |
||||||
|
.pb.qs:open\ |
||||||
|
set nrecs [.pb.qs:nrecords]\ |
||||||
|
.pb.qs:updatecontrols\ |
||||||
|
.pb.qs:fill .pb.allnames name} Find {}} {button button9 {159 276 229 302} {.pb.qs:close\ |
||||||
|
.pb.qs:clearcontrols\ |
||||||
|
set nrecs {}\ |
||||||
|
set what {}\ |
||||||
|
destroy .pb\ |
||||||
|
} Exit {}} {button button10 {102 249 124 269} {.pb.qs:movefirst\ |
||||||
|
.pb.qs:updatecontrols\ |
||||||
|
} |< {}} {button button11 {129 249 151 269} {.pb.qs:moveprevious\ |
||||||
|
.pb.qs:updatecontrols\ |
||||||
|
} << {}} {button button12 {156 249 178 269} {.pb.qs:movenext\ |
||||||
|
.pb.qs:updatecontrols} >> {}} {button button13 {183 249 205 269} {.pb.qs:movelast\ |
||||||
|
.pb.qs:updatecontrols\ |
||||||
|
} >| {}} {checkbox checkbox14 {33 87 126 105} {} {Is it a company ?} pbqs(company)} {radio usa {63 108 201 120} {} U.S.A. pbqs(continent)} {radio europe {63 126 204 141} {} Europe pbqs(continent)} {radio africa {63 144 210 159} {} Africa pbqs(continent)} {entry entry18 {30 180 117 198} {} entry18 what} {label label19 {108 219 188 234} {} {records found} {}} {label label20 {90 219 105 234} {} { } nrecs} {label label21 {3 252 33 267} {} OID= {}} {label label22 {39 252 87 267} {} { } pbqs(oid)} {button button23 {9 276 79 302} {set oid {}\ |
||||||
|
catch {set oid $pbqs(oid)}\ |
||||||
|
if {[string trim $oid]!=""} {\ |
||||||
|
sql_exec noquiet "update phonebook set name='$pbqs(name)', phone_nr='$pbqs(phone_nr)',city='$pbqs(city)',company='$pbqs(company)',continent='$pbqs(continent)' where oid=$oid"\ |
||||||
|
} else {\ |
||||||
|
tk_messageBox -title Error -message "No record is displayed!"\ |
||||||
|
}\ |
||||||
|
\ |
||||||
|
} Update {}} {button button24 {84 276 154 302} {set thisname {}\ |
||||||
|
catch {set thisname $pbqs(name)}\ |
||||||
|
if {[string trim $thisname]!=""} {\ |
||||||
|
sql_exec noquiet "insert into phonebook values ('$pbqs(name)','$pbqs(phone_nr)','$pbqs(city)','$pbqs(company)','$pbqs(continent)')"\ |
||||||
|
tk_messageBox -title Information -message "A new record has been added!"\ |
||||||
|
} else {\ |
||||||
|
tk_messageBox -title Error -message "This one doesn't have a name ?\ |
||||||
|
}\ |
||||||
|
\ |
||||||
|
} {Add new} {}} {button button25 {168 111 231 135} {.pb.qs:clearcontrols\ |
||||||
|
# clearcontrols stillinitialise\ |
||||||
|
# incorectly booleans controls to {}\ |
||||||
|
# so I force it to 'f' (false)\ |
||||||
|
set pbqs(company) f\ |
||||||
|
focus .pb.name_entry} New {}} {listbox allnames {246 12 432 240} {} listbox26 {}} |
||||||
|
A simple demo form asdf 14 {1 2 3 4 5 6 7 8 9 10 11 12 13 14} 377x315+170+155 {label label1 {15 36 99 57} {} {Selected color} {}} {entry entry2 {111 36 225 54} {} entry2 color} {radio red {249 21 342 36} {} {Red as cherry} color} {radio green {249 45 342 60} {} {Green as a melon} color} {radio blue {249 69 342 84} {} {Blue as the sky} color} {button button6 {45 69 198 99} {set color spooky} {Set a weird color} {}} {label label7 {24 129 138 147} {} {The checkbox's value} {}} {entry entry8 {162 129 172 147} {} entry8 cbvalue} {checkbox checkbox9 {180 126 279 150} {} {Check me :-)} cbvalue} {button button10 {219 273 366 303} {destroy .asdf} {Close that simple form} {}} {button button11 {219 237 366 267} {open_form "Phone book"} {Open my phone book} {}} {listbox lb {12 192 162 267} {} listbox12 {}} {button button13 {12 156 162 186} {.asdf.lb insert end red green blue cyan white navy black purple maroon violet} {Add some information} {}} {button button14 {12 273 162 303} {.asdf.lb delete 0 end} {Clear this listbox} {}} |
||||||
|
\. |
||||||
|
COPY pga_scripts FROM stdin; |
||||||
|
How are forms keeped inside ? open_table pga_forms\ |
||||||
|
\ |
||||||
|
|
||||||
|
\. |
||||||
|
COPY pga_reports FROM stdin; |
||||||
|
\. |
||||||
|
COPY phonebook FROM stdin; |
||||||
|
IBM 623346234 \N t usa |
||||||
|
John Doe +44 35 2993825 Washington f usa |
||||||
|
Bill Clinton +44 35 9283845 New York f usa |
||||||
|
Monica Levintchi +44 38 5234526 Dallas f usa |
||||||
|
Bill Gates +42 64 4523454 Los Angeles f usa |
||||||
|
COMPAQ 623462345 \N t usa |
||||||
|
SUN 784563253 \N t usa |
||||||
|
DIGITAL 922644516 \N t usa |
||||||
|
FIAT 623463445 \N t europe |
||||||
|
MUGADUMBU +92 534662634 \N t africa |
||||||
|
Frank Zappa 6734567 Montreal f usa |
||||||
|
Jimmy Page 66323452 f europe |
||||||
|
Constantin Teodorescu +40 39 611820 Braila f europe |
||||||
|
NGBENDU Wazabanga 34577345 \N f africa |
||||||
|
\. |
||||||
|
COPY pga_layout FROM stdin; |
||||||
|
pga_forms 2 formname formsource 82 713 |
||||||
|
phonebook 5 name phone_nr city company continent 150 105 80 66 85 |
||||||
|
\. |
@ -1,105 +1,224 @@ |
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
||||||
<HTML> |
<HTML> |
||||||
<HEAD> |
<HEAD> |
||||||
|
<TITLE></TITLE> |
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
||||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; Linux 2.0.32 i586) [Netscape]"> |
<META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; Linux 2.0.32 i586) [Netscape]"> |
||||||
</HEAD> |
</HEAD> |
||||||
<BODY TEXT="#000000" BGCOLOR="#FFEBCD" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000"> |
<BODY TEXT="#000000" BGCOLOR="#FFEBCD" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000"> |
||||||
|
|
||||||
<H1> |
<H1>FORMS</H1> |
||||||
FORMS</H1> |
|
||||||
|
|
||||||
<HR WIDTH="100%"> |
<P> |
||||||
|
<HR WIDTH="100%"></P> |
||||||
|
|
||||||
<P>This version (0.82) of PgAccess introduce the visual form builder. |
<P>This version (0.83) of PgAccess has changed a little the visual form |
||||||
|
builder introduced since 0.82 version : variable handling, query-results |
||||||
|
interface and control bindings naming convention. Please read it carefully, |
||||||
|
download the database demo and practice a while before trying to design |
||||||
|
your own forms.</P> |
||||||
|
|
||||||
<P>For the moment, it has only some basic widgets : labels, entries, buttons |
<P>For the moment, it has only some basic widgets : labels, entries, buttons |
||||||
, listboxes , checkboxes and radiobuttons. |
, listboxes , checkboxes and radiobuttons.</P> |
||||||
|
|
||||||
|
<P>Also there is a pseudo query widget that allows you yo have access to |
||||||
|
a query results. </P> |
||||||
|
|
||||||
|
<P><B>How do you generate widgets :</B></P> |
||||||
|
|
||||||
|
<OL> |
||||||
|
<LI>select a widget from the toolbox by clicking the appropriate radiobutton</LI> |
||||||
|
|
||||||
|
<LI>move to the canvas , point with the mouse at the desired location and |
||||||
|
click the mouse button to begin</LI> |
||||||
|
|
||||||
|
<LI>keeping the mouse-button pressed move the mouse in order to draw a |
||||||
|
rectangle that will hold the widget</LI> |
||||||
|
|
||||||
<P>Also there is a query widget that allows you yo have access to a query |
<LI>release the mouse-button </LI> |
||||||
results. |
</OL> |
||||||
|
|
||||||
<P>In a manner very similar with Visual Tcl or Visual Basic, the user must |
<P>In the rectangle that you have designed it will appear the selected |
||||||
select a widget from the toolbar and drags on the canvas the rectangle |
object.<BR> |
||||||
that would define the widget. It can also specify some attributes in a |
Move now to the attribute window to change some of its properties.</P> |
||||||
separate window. Renaming, resizing items are possible modifying parameters |
|
||||||
in attribute window. Do not forget to press Enter in the edit field after |
<P>Renaming, resizing items are possible (for the moment) only by modifying |
||||||
changing a value in order to be accepted. |
appropriate parameters in attribute window. You <B>must </B>press Enter |
||||||
|
in the edit field after changing a value in order to be accepted. </P> |
||||||
|
|
||||||
<P>You can also move items by dragging them or delete them by pressing |
<P>You can also move items by dragging them or delete them by pressing |
||||||
Del key. |
Del key after selecting them.</P> |
||||||
|
|
||||||
<P>In attribute window, there are some fields named <B><TT><FONT SIZE=+1>Command |
<P>In attribute window, there are some fields named <B><TT><FONT SIZE=+1>Command |
||||||
</FONT></TT></B>and <B><TT><FONT SIZE=+1>Variable</FONT></TT></B>. |
</FONT></TT></B>and <B><TT><FONT SIZE=+1>Variable</FONT></TT></B>. </P> |
||||||
|
|
||||||
<P>The field <B><TT><FONT SIZE=+1>Command </FONT></TT></B>have meaning |
<P>The field <B><TT><FONT SIZE=+1>Command </FONT></TT></B>have meaning |
||||||
only for Button widgets and holds the command that will be invoked when |
only for Button widgets and holds the command that will be invoked when |
||||||
the button is pressed. |
the button is pressed. </P> |
||||||
|
|
||||||
<P>The field <B><TT><FONT SIZE=+1>Variable </FONT></TT></B>have meaning |
<P> The field <B><TT><FONT SIZE=+1>Variable </FONT></TT></B>have |
||||||
only for EditField , Label widgets and checkboxes and it is the name of |
meaning only for EditField , Label widgets , checkboxes and radiobuttons |
||||||
the global variable that will hold the value for that widget. For checkboxes |
and it is the name of the global variable that will hold the value for |
||||||
the values are 1 or 0. |
that widget. For checkboxes the values are <B>t</B> and <B>f</B> (from |
||||||
|
true and false) in order to simplify binding to logical data fields (PgAccess |
||||||
<P>In order to make a simple test, put an entry field and set it's variable |
0.82 used 0 and 1).</P> |
||||||
to <B>v1</B> and a button who's command is "set v1 whisky". Press the button |
|
||||||
"Test form" and click on the button. In that entry should appear whisky. |
<P> For radiobuttons, it is usual to assign the |
||||||
<BR>Another test is defining in Script module a script called "My first |
same variable to the same radiobuttons within the same group. That variable |
||||||
script" having the following commands: |
will contain the name of the widget of the radiobutton that has been pressed. |
||||||
<BR><TT><FONT SIZE=+1>tk_messageBox -title Warning -message "This is my |
Let's presume that you have entered 3 radiobuttons named red, green and |
||||||
first message!"</FONT></TT> |
blue, all of them having the same variable named color. If you will press |
||||||
<BR>and then define a button who's command is <B><TT><FONT SIZE=+1>execute_script |
them, they will assign their names to global variable.</P> |
||||||
"My first script"</FONT></TT></B>. |
|
||||||
<H2> |
<P> In order to make a simple test, put an entry |
||||||
Database manipulation</H2> |
field and set it's variable to <B>v1</B> and a button who's command is |
||||||
Let's presume that our form have the internal name <B><TT>mf </TT></B>(my |
"set v1 whisky". Press the button "Test form" and click |
||||||
form). He wil be referred inside the Tcl/Tk source as <B><TT>.mf</TT></B> |
on the button. In that entry should appear whisky. <BR> |
||||||
<BR>If you want to close the form in run-time you have to issue the command |
Another test is defining in Script module a script called "My first |
||||||
<B><TT>destroy .mf</TT></B> |
script" having the following commands: <BR> |
||||||
|
<TT><FONT SIZE=+1>tk_messageBox -title Warning -message "This is my |
||||||
|
first message!"</FONT></TT> <BR> |
||||||
|
and then define a button who's command is <B><TT><FONT SIZE=+1>execute_script |
||||||
|
"My first script"</FONT></TT></B>. </P> |
||||||
|
|
||||||
|
<H2>Database manipulation</H2> |
||||||
|
|
||||||
|
<P>Let's presume that our form have the internal name <B><TT>mf </TT></B>(my |
||||||
|
form). He will be referred inside the Tcl/Tk source as <B><TT>.mf</TT></B> |
||||||
|
<BR> |
||||||
|
If you want to close the form in run-time you have to issue the command |
||||||
|
<B><TT>destroy .mf</TT></B> </P> |
||||||
|
|
||||||
<P>Also, any widget will have the name prefixed by <B><TT>.mf </TT></B> |
<P>Also, any widget will have the name prefixed by <B><TT>.mf </TT></B> |
||||||
We will have <B><TT>.mf.button1</TT></B> or <B><TT>.mf.listbox1</TT></B> |
We will have <B><TT>.mf.button1</TT></B> or <B><TT>.mf.listbox1</TT></B> |
||||||
. |
. </P> |
||||||
|
|
||||||
<P>We can name the query widget <B><TT>qry</TT></B> for example. The complete |
<P>We can name the query widget <B><TT>qry</TT></B> for example. The complete |
||||||
name will be <B><TT>.mf.qry</TT></B> then. |
name will be <B><TT>.mf.qry</TT></B> then. <BR> |
||||||
<BR>The <B><TT>Command </TT></B>property of the query widget must contain |
The <B><TT>Command </TT></B>property of the query widget must contain the |
||||||
the SQL command that will be executed. |
SQL command that will be executed. <BR> |
||||||
<BR>When the form will be in run-time, automatically you will have acces |
When the form will be in run-time, automatically you will have acces to |
||||||
to the following methods : |
the following procedures and functions : </P> |
||||||
|
|
||||||
<P><TT>.mf.qry:execute</TT> - opens the connection and execute the query |
<P><B><TT>.mf.qry:open</TT></B> - opens the connection and execute the |
||||||
(returns nothing) |
query (returns nothing) <BR> |
||||||
<BR><TT>.mf.qry:nrecords</TT> - returns the number of records in the selected |
<B><TT>.mf.qry:setsql newsql</TT></B> - set the command query that will |
||||||
query |
be executed at the next <B><TT>.mf.qry:open<BR> |
||||||
<BR><TT>.mf.qry:fields</TT> - returns a list of the fields in the result |
.mf.qry:nrecords</TT></B> - returns the number of records in the selected |
||||||
set |
query <BR> |
||||||
<BR><TT>.mf.qry:movefirst</TT> - move the cursor to the first record in |
<B><TT>.mf.qry:crtrecord </TT></B>- returns the current record number inside |
||||||
the recordset |
the query result<BR> |
||||||
<BR><TT>.mf.qry:movelast , .mf.qry:movenext , .mf.qry:moveprevious </TT>- |
<B><TT>.mf.qry:fields</TT></B> - returns a list of the fields in the result |
||||||
moves the cursor |
set <BR> |
||||||
<BR><TT>.mf.qry:updatecontrols</TT> - update the variables inside the designed |
<B><TT>.mf.qry:movefirst</TT></B> - move the cursor to the first record |
||||||
form that have a particular name (I'll explain later) |
in the recordset <BR> |
||||||
<BR><TT>.mf.qry:close</TT> - close the connection (<B><FONT COLOR="#FF0000">if |
<TT><B>.mf.qry:movelast</B> , <B>.mf.qry:movenext</B> , <B>.mf.qry:moveprevious</B> |
||||||
you don't close the query result, you will loose memory</FONT></B>) |
</TT>- moves the cursor there<BR> |
||||||
|
<B><TT>.mf.qry:moveto newrecno</TT></B> - move the cursor to that new record |
||||||
|
number (first is 0)<BR> |
||||||
|
<B><TT>.mf.qry:updatecontrols</TT></B> - update the variables inside the |
||||||
|
designed form that have a particular name (I'll explain later) <BR> |
||||||
|
<B><TT>.mf.qry:clearcontrols</TT></B> - clear the variables inside the |
||||||
|
designed form binded to a query result<BR> |
||||||
|
<TT><B>.mf.qry:fill listbox field</B> </TT>- fill the named listbox (whole |
||||||
|
widget name as <B><TT>.mf.listbox1</TT></B>) with the all the values of |
||||||
|
that field in the current queryresult<BR> |
||||||
|
<B><TT>.mf.qry:close</TT></B> - close the connection (<B><FONT COLOR="#FF0000">if |
||||||
|
you don't close the query result, you will loose some memory</FONT></B>) |
||||||
|
</P> |
||||||
|
|
||||||
|
<P>It's no need to close a query-result if you want to assign it a new |
||||||
|
SQL command and open it again. That will be done automatically.</P> |
||||||
|
|
||||||
<P>If you want to bound some controls to the fields of the recordset, you |
<P>If you want to bound some controls to the fields of the recordset, you |
||||||
will have to name their associate variable like that : |
will have to name their associate variable like that : </P> |
||||||
|
|
||||||
<P><TT>.mf.qry.salary</TT> to get the "salary" field , or <TT>.mf.qry.name</TT> |
<P><B><TT>mfqry(salary)</TT></B> to get the "salary" field , |
||||||
to get the "name" field. |
or <B><TT>mfqry(name)</TT></B> to get the "name" field. So, you |
||||||
|
take the internale name of the form (without the leading point) and merge |
||||||
<P>It's simple, isn't it ? It's just like a new widget that have some properties |
it with the query-widget name and you will get a associative arrayname. |
||||||
and methods that can be accesed. |
The values are given using the field name as a key in this associative |
||||||
<BR>Also, the name convention is just like in Tcl/Tk. |
array.<BR> |
||||||
|
<B><FONT COLOR="#FF0000">* WARNING *</FONT></B> The naming style has been |
||||||
|
changed from 0.82 version of PgAccess and I cannot guarantee that it not |
||||||
|
be changed again in the future. I'm just trying to make it as simple it |
||||||
|
could be. The old style naming convention had some incompatibilities with |
||||||
|
Tcl/Tk syntax.</P> |
||||||
|
|
||||||
|
<P><B><FONT SIZE=+1><FONT COLOR="#9400D3">QUESTION</FONT> : </FONT></B>Do |
||||||
|
you think that it would be more clear if the above functions and procedures |
||||||
|
regarding a query-widget would be named in a similar manner as binded variable |
||||||
|
controls ? That mean, <B><TT>mfqry:open</TT></B> and <B><TT>mfqry:updatecontrols</TT></B> |
||||||
|
instead of <B><TT>.mf.qry:open</TT></B> and <B><TT>.mf.qry:updatecontrols</TT></B> |
||||||
|
?</P> |
||||||
|
|
||||||
|
<P>The only advantage of <B><TT>.mf.qry:open</TT></B> is that is much closer |
||||||
|
to the Tk method of referring objects within a window and it may give to |
||||||
|
the programmer the feeling that he is using a object-oriented widget. Since |
||||||
|
I cannot use further for naming binded variables a similar manner (<B><TT>.mf.qry.salary)</TT></B> |
||||||
|
it might be possible to abandon that naming convention .</P> |
||||||
|
|
||||||
|
<P>Here it is a dumped <B><A HREF="formdemo.sql">sample database</A></B> |
||||||
|
that contains a demo database. What should you do ?<BR> |
||||||
|
Shift-click the above URL in order to download that tiny file (4 Kb). Create |
||||||
|
a empty database and <B><TT>psql yourdatabase <formdemo.sql</TT></B></P> |
||||||
|
|
||||||
|
<P>You should find a single table called "phonebook" a form called |
||||||
|
"Phone book" and another "A simple demo form".</P> |
||||||
|
|
||||||
|
<P>First of all enter and view the phonebook table in table view. Note |
||||||
|
the fields and their values.<BR> |
||||||
|
Open the "Phone book" form and enter a letter (a, e or i) in |
||||||
|
the field to the left of "Find" button then press Find. It's |
||||||
|
fine to enter one letter in order to get more records in query result. |
||||||
|
You will get information about the number of records selected, in the listbox |
||||||
|
you will see all the values of field "name" from the current |
||||||
|
data set. Use buttons to move to first, next, previous or last record within |
||||||
|
the record set.</P> |
||||||
|
|
||||||
|
<P>In order to add a new record, press the "New" button in order |
||||||
|
to get new, clean entries. Fill them with your data and press "Add |
||||||
|
new" button. A new phonebook record will be added. Also, if you want |
||||||
|
to update a record, change it's values in the displayed fields after finding |
||||||
|
it and press "Update" button. The values will be updated in the |
||||||
|
database BUT NOT IN THE CURRENT QUERY RESULT . If you want to see them |
||||||
|
modified, make a new query trying to find it again.</P> |
||||||
|
|
||||||
|
<P><FONT COLOR="#000080">Before using the results from a query you should |
||||||
|
know that the information that has been retrieved could be found only in |
||||||
|
your computer client memory. It has <B>no live connection</B> to the data |
||||||
|
from the database. That's why it isn't possible to develop a simple update |
||||||
|
function as interface to that query-result widget. More than that : a query |
||||||
|
result could be obtained from a SQL command that return a non-updatable |
||||||
|
data set !!! For example fields gathered from multiple tables or summary |
||||||
|
fields. It isn't just simple to make an automatic update procedure. The |
||||||
|
programmer must know how to make the update or the append procedure, sometimes |
||||||
|
using key fields to point to the desired record or an OID. There are examples |
||||||
|
in the demo database in "Phone book" form. It may be possible |
||||||
|
that in the future, I will develop another pseudo-widget describing a table. |
||||||
|
It would be more simple than to implement an update or append or even a |
||||||
|
delete procedure.</FONT></P> |
||||||
|
|
||||||
|
<P>There is in the demo database also another simple form called "A |
||||||
|
simple demo form". It will show you how to handle variables from checkboxes, |
||||||
|
radiobuttons, how to use listboxes, open another forms and so on. I think |
||||||
|
they will help you.</P> |
||||||
|
|
||||||
<P>In order to avoid naming user defined forms with a particular |
<P>In order to avoid naming user defined forms with a particular |
||||||
name of another PgAccess form, I would recommend naming them as udf0, udf1 |
name of another PgAccess form, I would recommend naming them as udf0, udf1 |
||||||
(user defined form 0 , 1 ) |
(user defined form 0 , 1 ) </P> |
||||||
|
|
||||||
<P> |
<P> |
||||||
<HR WIDTH="25%"> |
<HR WIDTH="25%"></P> |
||||||
|
|
||||||
<P>Please feel free to send me your oppinion at <B>teo@flex.ro</B> on forms |
<P>Please feel free to send me your oppinion at <B>teo@flex.ro</B> on forms |
||||||
designing and usage. |
designing and usage. </P> |
||||||
|
|
||||||
|
<P><B><FONT SIZE=+1>KEEP IN MIND ! THE |
||||||
|
FORM API WILL CHANGE IN ORDER TO BE MORE SIMPLE AND BETTER! SEND |
||||||
|
ME YOUR WISHES, YOUR IDEAS, YOUR OPINIONS !<BR> |
||||||
|
ALSO ... DON'T BLAME ME IF YOU WILL HAVE TO RE-DESIGN YOUR OLD FORMS DUE |
||||||
|
TO SOME INCOMPATIBILITIES WITH NEWER PGACCESS VERSIONS.</FONT></B></P> |
||||||
|
|
||||||
</BODY> |
</BODY> |
||||||
</HTML> |
</HTML> |
||||||
|
@ -1,118 +1,130 @@ |
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
||||||
<HTML> |
<HTML> |
||||||
<HEAD> |
<HEAD> |
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
|
||||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; Linux 2.0.32 i586) [Netscape]"> |
|
||||||
<TITLE>PgAccess - a Tcl/Tk PostgreSQL interface</TITLE> |
<TITLE>PgAccess - a Tcl/Tk PostgreSQL interface</TITLE> |
||||||
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
||||||
|
<META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; Linux 2.0.32 i586) [Netscape]"> |
||||||
</HEAD> |
</HEAD> |
||||||
<BODY BGCOLOR="#FFFFFF"> |
<BODY BGCOLOR="#FFFFFF"> |
||||||
|
|
||||||
<H1> |
<H1>PgAccess - a database management tool for <A HREF="http://www.postgreSQL.org">PostgreSQL</A></H1> |
||||||
PgAccess - a database management tool for <A HREF="http://www.postgreSQL.org">PostgreSQL</A></H1> |
|
||||||
|
|
||||||
<HR> |
<P> |
||||||
|
<HR></P> |
||||||
|
|
||||||
<P>This program is protected by the following <A HREF="copyright.html">copyright</A> |
<P>This program is protected by the following <A HREF="copyright.html">copyright</A> |
||||||
<LI> |
</P> |
||||||
<A HREF="pgaccess-0.82.tar.gz">Download the last version of Pgaccess (press |
|
||||||
shift and click this link)</A>.</LI> |
<LI><A HREF="pgaccess-0.83.tar.gz">Download the last version of Pgaccess |
||||||
|
(press shift and click this link)</A>.</LI> |
||||||
|
|
||||||
|
<P>Latest version of PgAccess is 0.83 , 11 March 1998 ! <BR> |
||||||
|
</P> |
||||||
|
|
||||||
<P>Latest version of PgAccess is 0.82 , 1 March 1998 ! |
|
||||||
<BR> |
|
||||||
<CENTER><TABLE BORDER=3 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" BGCOLOR="#FFB6C1" > |
<CENTER><TABLE BORDER=3 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" BGCOLOR="#FFB6C1" > |
||||||
<TR> |
<TR> |
||||||
<TD> |
<TD> |
||||||
<CENTER></CENTER> |
<CENTER><P><B><FONT SIZE=+2>PgAccess can now design <A HREF="forms.html">Forms</A></FONT></B>, |
||||||
|
<B><FONT SIZE=+2><A HREF="pga-rad.html">Reports and Scripts</A></FONT></B> |
||||||
<CENTER><B><FONT SIZE=+2>PgAccess can now design <A HREF="forms.html">Forms</A></FONT></B>, |
</P></CENTER> |
||||||
<B><FONT SIZE=+2><A HREF="pga-rad.html">Reports and Scripts</A></FONT></B></CENTER> |
|
||||||
</TD> |
</TD> |
||||||
</TR> |
</TR> |
||||||
</TABLE></CENTER> |
</TABLE></CENTER> |
||||||
I think that there were some problems loading libpgtcl library. |
|
||||||
<BR>I invite you to read a <A HREF="index.html#libpgtcl">special section |
<H3><FONT COLOR="#000080">Installation problems</FONT></H3> |
||||||
concerning <B>libpgtcl</B></A> |
|
||||||
<H3> |
<UL> |
||||||
<FONT COLOR="#191970">What does PgAccess now!</FONT></H3> |
<LI>Some problems related with locale special characters could be solved |
||||||
Here are some images from PgAccess windows : <A HREF="pic-pga-1.gif">Main |
by this <A HREF="specialchars.html">simple patch</A></LI> |
||||||
|
|
||||||
|
<LI>I think that there were some problems loading libpgtcl library. I invite |
||||||
|
you to read a <A HREF="index.html#libpgtcl">special section concerning |
||||||
|
libpgtcl</A> </LI> |
||||||
|
</UL> |
||||||
|
|
||||||
|
<H3><FONT COLOR="#191970">What does PgAccess now!</FONT></H3> |
||||||
|
|
||||||
|
<P>Here are some images from PgAccess windows : <A HREF="pic-pga-1.gif">Main |
||||||
window </A>, <A HREF="pic-pga-2.gif">table builder </A>, <A HREF="pic-pga-4.gif">table(query) |
window </A>, <A HREF="pic-pga-2.gif">table builder </A>, <A HREF="pic-pga-4.gif">table(query) |
||||||
view </A>, <A HREF="pic-pga-3.gif">visual query builder </A>. |
view </A>, <A HREF="pic-pga-3.gif">visual query builder </A>. </P> |
||||||
|
|
||||||
<P><B>Tables</B> |
<P><B>Tables</B> <BR> |
||||||
<BR>- opening tables for viewing, max 200 records (changed by preferences |
- opening tables for viewing, max 200 records (changed by preferences menu) |
||||||
menu) |
<BR> |
||||||
<BR>- column resizing, dragging the vertical grid line (better in table |
- column resizing, dragging the vertical grid line (better in table space |
||||||
space rather than in the table header) |
rather than in the table header) <BR> |
||||||
<BR>- text wrap in cells - layout saved for every table |
- text wrap in cells - layout saved for every table <BR> |
||||||
<BR>- import/export to external files (SDF,CSV) |
- import/export to external files (SDF,CSV) <BR> |
||||||
<BR>- filter capabilities (enter filter like (price>3.14) |
- filter capabilities (enter filter like (price>3.14) <BR> |
||||||
<BR>- sort order capabilities (enter manually the sort field(s)) |
- sort order capabilities (enter manually the sort field(s)) <BR> |
||||||
<BR>- editing in place |
- editing in place <BR> |
||||||
<BR>- improved table generator assistant |
- improved table generator assistant <BR> |
||||||
<BR>- improved field editing |
- improved field editing <BR> |
||||||
<BR><B>Queries</B> |
<B>Queries</B> <BR> |
||||||
<BR>- define , edit and stores "user defined queries" |
- define , edit and stores "user defined queries" <BR> |
||||||
<BR>- store queries as views |
- store queries as views <BR> |
||||||
<BR>- execution of queries |
- execution of queries <BR> |
||||||
<BR>- viewing of select type queries result |
- viewing of select type queries result <BR> |
||||||
<BR>- query deleting and renaming |
- query deleting and renaming <BR> |
||||||
<BR>- <B><BLINK><FONT COLOR="#FF0000">NEW !!!</FONT></BLINK></B> Visual |
- visual query builder with drag & drop capabilities. For any of you |
||||||
query builder with drag & drop capabilities. For any of you who had |
who had installed the Tcl/Tk plugin for Netscape Navigator, you can see |
||||||
installed the Tcl/Tk plugin for Netscape Navigator, you can see it at work |
it at work <A HREF="qbtclet.html">clicking here</A> <BR> |
||||||
<A HREF="qbtclet.html">clicking here</A> |
<B>Sequences</B> <BR> |
||||||
<BR><B>Sequences</B> |
- defines sequences, delete them and inspect them <BR> |
||||||
<BR>- defines sequences, delete them and inspect them |
<B>Functions</B> <BR> |
||||||
<BR><B>Functions</B> |
- define, inspect and delete functions in SQL language <BR> |
||||||
<BR>- define, inspect and delete functions in SQL language |
<B>Reports</B> <BR> |
||||||
<BR><B>Reports</B> |
- design and display simple reports from tables <BR> |
||||||
<BR>- design and display simple reports from tables |
- fields and labels, font changing, style and size <BR> |
||||||
<BR>- fields and labels, font changing, style and size |
- saves and loads report description from database <BR> |
||||||
<BR>- saves and loads report description from database |
- show report previews, sample postscript output file <BR> |
||||||
<BR>- show report previews, sample postscript output file |
<B>Forms</B> <BR> |
||||||
<BR><B>Forms</B> |
- open user defined forms <BR> |
||||||
<BR>- open user defined forms |
- form design module available <BR> |
||||||
<BR>- form design module available |
- query widget available, controls bound to query results <BR> |
||||||
<BR>- query widget available, controls bound to query results |
- <A HREF="forms.html">click here</A> for a description of forms and how |
||||||
<BR>- <A HREF="forms.html">click here</A> for a description of forms and |
they can be used <BR> |
||||||
how they can be used |
<B>Scripts</B> <BR> |
||||||
<BR><B>Scripts</B> |
- define, modify and call user defined scripts <BR> |
||||||
<BR>- define, modify and call user defined scripts |
Here is <A HREF="pga-rad.html">a special section concerning forms and scripts</A> |
||||||
<BR>Here is <A HREF="pga-rad.html">a special section concerning forms and |
. </P> |
||||||
scripts</A> . |
|
||||||
|
<P>On the TODO list! <BR> |
||||||
<P>On the TODO list! |
- table design (add new fields, renaming, etc.) </P> |
||||||
<BR>- table design (add new fields, renaming, etc.) |
|
||||||
|
<P> </P> |
||||||
<P> |
|
||||||
|
|
||||||
<P>If you have any comment, suggestion for improvements, please feel free |
<P>If you have any comment, suggestion for improvements, please feel free |
||||||
to e-mail to : <A HREF="mailto:teo@flex.ro">teo@flex.ro </A> |
to e-mail to : <A HREF="mailto:teo@flex.ro">teo@flex.ro </A> </P> |
||||||
|
|
||||||
<P><B><FONT COLOR="#FF1493"><FONT SIZE=+2>Mailing list for PgAccess </FONT></FONT></B><A HREF="maillist.html">Here |
<P><B><FONT COLOR="#FF1493"><FONT SIZE=+2>Mailing list for PgAccess </FONT></FONT></B><A HREF="maillist.html">Here |
||||||
you will find how to subscribe to this mailing list</A>. |
you will find how to subscribe to this mailing list</A>. </P> |
||||||
|
|
||||||
<P> |
<P> |
||||||
<HR> |
<HR></P> |
||||||
<H1> |
|
||||||
More information about libgtcl</H1> |
<H1>More information about libgtcl</H1> |
||||||
Also, you will need the PostgreSQL to Tcl interface library, lined as a |
|
||||||
Tcl/Tk 'load'-able module. It is called libpgtcl and the source is located |
<P>Also, you will need the PostgreSQL to Tcl interface library, lined as |
||||||
|
a Tcl/Tk 'load'-able module. It is called libpgtcl and the source is located |
||||||
in the PostgreSQL directory /src/interfaces/libpgtcl. Specifically, you |
in the PostgreSQL directory /src/interfaces/libpgtcl. Specifically, you |
||||||
will need a libpgtcl library that is 'load'-able from Tcl/Tk. This is technically |
will need a libpgtcl library that is 'load'-able from Tcl/Tk. This is technically |
||||||
different from an ordinary PostgreSQL loadable object file, because libpgtcl |
different from an ordinary PostgreSQL loadable object file, because libpgtcl |
||||||
is a collection of object files. Under Linux, this is called libpgtcl.so. |
is a collection of object files. Under Linux, this is called libpgtcl.so. |
||||||
<BR>You can download <A HREF="libpgtcl.so">from here </A>a version already |
<BR> |
||||||
compiled for Linux i386 systems. Just copy libpgtcl.so into your system |
You can download <A HREF="libpgtcl.so">from here </A>a version already |
||||||
library director (/usr/lib) and go for it. One of the solutions is to remove |
compiled for Linux RedHat 4.2 i386 systems. Just copy libpgtcl.so into |
||||||
from the source the line containing <B>load libpgtcl.so </B>and to load |
your system library directory (/usr/lib or /lib) and go for it. One of |
||||||
pgaccess.tcl not with wish, but with pgwish (or wishpg) that wish that |
the solutions is to remove from the source the line containing <B>load |
||||||
was linked with libpgtcl library! |
libpgtcl.so </B>and to load pgaccess.tcl not with wish, but with pgwish |
||||||
|
(or wishpg) that wish that was linked with libpgtcl library! </P> |
||||||
|
|
||||||
<P>If you have installed RedHat 5.0, you should get the last distribution |
<P>If you have installed RedHat 5.0, you should get the last distribution |
||||||
kit of postgreSQL and compile it from scratch. RedHat 5.0 is using some |
kit of postgreSQL and compile it from scratch. RedHat 5.0 is using some |
||||||
new versions of libraries and you have to compile and install again at |
new versions of libraries and you have to compile and install again at |
||||||
least <B>libpq </B>and <B><TT>libpgtcl </TT></B>libraries. |
least <B>libpq </B>and <B><TT>libpgtcl </TT></B>libraries. </P> |
||||||
|
|
||||||
|
<P>However, the application should work without problems! </P> |
||||||
|
|
||||||
<P>However, the application should work without problems! |
|
||||||
</BODY> |
</BODY> |
||||||
</HTML> |
</HTML> |
||||||
|
@ -0,0 +1,47 @@ |
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
||||||
|
<HTML> |
||||||
|
<HEAD> |
||||||
|
<TITLE>Special locale characters</TITLE> |
||||||
|
<META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; Linux 2.0.32 i586) [Netscape]"> |
||||||
|
</HEAD> |
||||||
|
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000"> |
||||||
|
|
||||||
|
<H1>Special locale characters and PgAccess |
||||||
|
<HR WIDTH="100%"></H1> |
||||||
|
|
||||||
|
<P>The problem is related with some special characters used in different |
||||||
|
countries because PgAccess did not use fonts with `-ISO8859-1' encoding |
||||||
|
-- </P> |
||||||
|
|
||||||
|
<P>The sollution was proposed by H.P.Heidinger ( hph@hphbbs.ruhr.de) and |
||||||
|
it's very simple.</P> |
||||||
|
|
||||||
|
<P>If you look into PgAccess, you will find fonts declared as follows :</P> |
||||||
|
|
||||||
|
<P><TT>$ grep -e '-font' -i pgaccess.tcl<BR> |
||||||
|
-font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* \<BR> |
||||||
|
-font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* \<BR> |
||||||
|
-font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* \<BR> |
||||||
|
-font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* \</TT></P> |
||||||
|
|
||||||
|
<P>It should be something like: -adobe-helvetica-medium-r-normal-*-*-120-*-*-*-*-iso8859-1</P> |
||||||
|
|
||||||
|
<P>You can achieve this by running the following script :</P> |
||||||
|
|
||||||
|
<P><TT>#!/bin/sh<BR> |
||||||
|
cp pgaccess.tcl pgaccess.tcl-org<BR> |
||||||
|
cat pgaccess.tcl |\<BR> |
||||||
|
sed -e's/\-\*\-\*\ /\-iso8859\-1\ /g' |\<BR> |
||||||
|
sed -e's/\-\*\-\*\}/\-iso8859\-1}/g' |\<BR> |
||||||
|
sed -e's/\-\*\-\*\]/\-iso8859\-1]/g' |\<BR> |
||||||
|
sed -e's/\-\*\-\*$/\-iso8859\-1/g' |\<BR> |
||||||
|
sed -e's/\-Clean\-/\-Fixed\-/g' |\<BR> |
||||||
|
sed -e's/clean/fixed/g' >pgaccess.iso<BR> |
||||||
|
mv pgaccess.iso pgaccess.tcl<BR> |
||||||
|
chmod +x pgaccess.tcl</TT></P> |
||||||
|
|
||||||
|
<P>The final version of PgAccess (1.0) will let the user decide what fonts |
||||||
|
will be used through a "preferences" dialog window.</P> |
||||||
|
|
||||||
|
</BODY> |
||||||
|
</HTML> |
Loading…
Reference in new issue