[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/gnuef README TODO samples/zipcode/pg_zip_c...
From: |
James Thompson |
Subject: |
gnue/gnuef README TODO samples/zipcode/pg_zip_c... |
Date: |
Tue, 31 Oct 2000 21:06:33 -0800 |
CVSROOT: /cvs
Module name: gnue
Changes by: James Thompson <address@hidden> 00/10/31 21:06:33
Modified files:
gnuef : README TODO
gnuef/samples/zipcode: pg_zip_code.sql zip_code.gfd
gnuef/src : GFForm.py GFObjects.py UIwxpython.py
Log message:
Enhanced menu
Datasources now purge deleted records on delete
Updated zipcode example database to use primary keys
Updated README
Updated TODO
CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/README.diff?r1=1.9&r2=1.10
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/TODO.diff?r1=1.14&r2=1.15
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/samples/zipcode/pg_zip_code.sql.diff?r1=1.3&r2=1.4
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/samples/zipcode/zip_code.gfd.diff?r1=1.13&r2=1.14
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/GFForm.py.diff?r1=1.30&r2=1.31
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/GFObjects.py.diff?r1=1.27&r2=1.28
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/UIwxpython.py.diff?r1=1.23&r2=1.24
Patches:
Index: gnue/gnuef/README
diff -u gnue/gnuef/README:1.9 gnue/gnuef/README:1.10
--- gnue/gnuef/README:1.9 Fri Oct 27 12:59:26 2000
+++ gnue/gnuef/README Tue Oct 31 21:06:33 2000
@@ -6,13 +6,13 @@
typical bonehead consumer maneuver. Which is why we ask you
to PLEASE FOR GOD'S SAKE READ THIS OWNER'S MANUAL CAREFULLY
BEFORE YOU UNPACK THE DEVICE. YOU ALREADY UNPACKED IT, DIDN'T
- YOU? YOU UNPACKED IT AND PLUGGED IT IN AND TURNED IT ON AND
+ YOU? YOU UNPACKED IT AND PLUGGED IT IN AND TURNED IT ON AND
FIDDLED WITH THE KNOBS, AND NOW YOUR CHILD, THE SAME CHILD WHO
ONCE SHOVED A POLISH SAUSAGE INTO YOUR VIDEOCASSETTE RECORDER
AND SET IT ON "FAST FORWARD", THIS CHILD ALSO IS FIDDLING
WITH THE KNOBS, RIGHT? AND YOU'RE JUST NOW STARTING TO READ
THE INSTRUCTIONS, RIGHT??? WE MIGHT AS WELL JUST BREAK THESE
- DEVICES RIGHT AT THE FACTORY BEFORE WE SHIP THEM OUT, YOU
+ DEVICES RIGHT AT THE FACTORY BEFORE WE SHIP THEM OUT, YOU
KNOW THAT?
-- Dave Barry, "Read This First!"
-- Shamelessly ripped off from the
@@ -52,11 +52,12 @@
su
python setup.py install
- You'll need to apply the pg.py.patch file to the
- pg.py included with 3.0. For those that dont know you
- can patch by doing
- patch pg.py pg.py.patch
+ Note: If you're using tables w/o primary keys defined
+ you'll need to apply the pg.py.patch file to the
+ pg.py included with PyGreSQL 3.0. You can patch by
+
+ patch pg.py pg.py.patch
To use:
Index: gnue/gnuef/TODO
diff -u gnue/gnuef/TODO:1.14 gnue/gnuef/TODO:1.15
--- gnue/gnuef/TODO:1.14 Fri Oct 27 12:59:26 2000
+++ gnue/gnuef/TODO Tue Oct 31 21:06:33 2000
@@ -1,23 +1,28 @@
-The todo list for gnue forms -
-
Tasks that someone is working on have the persons email and/or
name in []
+
+** MUST HAVES for 0.1.0
+** Create UI/Form event interactions for login
+** debug master/detail, UI, delete purges
+** make packages (RPM and deb) [jade]
+** Make GFDataSource verify that all records in memory are saved
+ prior to clearing and new queries
+
fill in todo list (easy as there is a lot of DOs to TO) [everyone]
clean up code [everyone working on the code]
- ***Clean up code to provide better seperation of Objects in the Data system
+ provide better seperation of Objects in the Data system
+ restore proper encapsulation in system
Convert the form and view to support auto ajustment of grid system
to text based instead of pixel based
- Add menu support
-
Add toolbar support
- Add layout manager support
+ Add order by support to datasource
- Add support of mouse focus to the charater
+ Add layout manager support
need to add default attrib values support
@@ -25,22 +30,21 @@
Autocreate a datasource for block that don't specify one
- Make GFDataSource verify that all records in memory are saved
- prior to clearing and new queries
-
Make modification of data lock the record in the backend
Transaction support
Create UI/Form event interactions for
- login
- progress info dialogs
- sending info like current record count/status to UI
ability for ui/forms to launch other ui/forms
lookup dialogs
- Add code to make a GUI startup failure roll into a text mode attempt
+ user extensible menus
+
+ menus should disable options not available (maybe)
+ might be better to let GFForm send alert
+ named triggers
+
Move things like database init in GFForm out of __init__ and
into a initialize routine that is called via some type of
uiINITIALIZED event so that a UI windows can prompt for things
@@ -50,15 +54,22 @@
call the initializes of their children so we can get rid of
more of the self.walk nonsense
- debug master/detail
-
Moving the focus from entry in one block to a different block does
not result in the currentBlock switching to the new block
rewrite the whole friggen braindead focus system to accomidate
- entries with multiple record visible
mouse navigation to different blocks
taborder support
+
+ Tweaks:
+ certain attributes should only apply when in normal mode
+ (numeric allowing % during query is a working example)
+
+ Add code to make a GUI startup failure roll into a text mode attempt
+
+ Add support of mouse focus to the charater
+
+
+
- make packages (RPM and deb) (jade)
Index: gnue/gnuef/samples/zipcode/pg_zip_code.sql
diff -u gnue/gnuef/samples/zipcode/pg_zip_code.sql:1.3
gnue/gnuef/samples/zipcode/pg_zip_code.sql:1.4
--- gnue/gnuef/samples/zipcode/pg_zip_code.sql:1.3 Tue Oct 24 20:27:51 2000
+++ gnue/gnuef/samples/zipcode/pg_zip_code.sql Tue Oct 31 21:06:33 2000
@@ -1,14 +1,15 @@
-create table zip_code
+create table states
(
- zip char(5),
- city varchar(30),
- state char(2)
+ state char(2) PRIMARY KEY,
+ description varchar(30) NOT NULL
);
-create table states
+
+create table zip_code
(
- state char(2),
- description varchar(30)
+ zip char(5) PRIMARY KEY,
+ city varchar(30) NOT NULL,
+ state char(2) NOT NULL REFERENCES states
);
INSERT INTO states (state, description) VALUES('AL','Alabama');
@@ -64,4 +65,13 @@
INSERT INTO states (state, description) VALUES('WA','Washington');
INSERT INTO states (state, description) VALUES('WV','West Virginia');
INSERT INTO states (state, description) VALUES('WI','Wisconsin');
-INSERT INTO states (state, description) VALUES('WY','Wyoming');
\ No newline at end of file
+INSERT INTO states (state, description) VALUES('WY','Wyoming');
+
+
+
+
+
+
+
+
+
Index: gnue/gnuef/samples/zipcode/zip_code.gfd
diff -u gnue/gnuef/samples/zipcode/zip_code.gfd:1.13
gnue/gnuef/samples/zipcode/zip_code.gfd:1.14
--- gnue/gnuef/samples/zipcode/zip_code.gfd:1.13 Thu Oct 26 14:59:54 2000
+++ gnue/gnuef/samples/zipcode/zip_code.gfd Tue Oct 31 21:06:33 2000
@@ -16,7 +16,7 @@
<page>
<block name="zip" datasource="zips">
<label text="City" x="5" y="10"/>
- <entry name="city" field="city" x="5" y="20" width="150" height="20"
visibleCount="10" uppercase="" readonly="">
+ <entry name="city" field="city" x="5" y="20" width="150" height="20"
visibleCount="10" uppercase="">
<options>
<tip>Don't eat yellow snow</tip>
</options>
@@ -40,14 +40,3 @@
</page>
</form>
-
-
-
-
-
-
-
-
-
-
-
Index: gnue/gnuef/src/GFForm.py
diff -u gnue/gnuef/src/GFForm.py:1.30 gnue/gnuef/src/GFForm.py:1.31
--- gnue/gnuef/src/GFForm.py:1.30 Thu Oct 26 14:59:54 2000
+++ gnue/gnuef/src/GFForm.py Tue Oct 31 21:06:33 2000
@@ -173,6 +173,7 @@
tip = None
status =
self.currentBlock.dataSourceLink.resultSetStatus[self.currentBlock.currentRecord]
+
self.dispatchEvent(GFEvent('uiUPDATESTATUS',[tip,status,self.insertMode,self.currentBlock.currentRecord+1,self.currentBlock.recordCount+1]))
def findValue(self, blockname, fieldname):
@@ -455,7 +456,8 @@
if hasattr(self.currentEntry,'max_length'):
if len(currentvalue) >= int(self.currentEntry.max_length):
return
- if hasattr(self.currentEntry,'numeric'):
+
+ if hasattr(self.currentEntry,'numeric') and self.currentBlock.mode ==
'Normal':
if not (event.data in string.digits or event.data in '.'):
return
Index: gnue/gnuef/src/GFObjects.py
diff -u gnue/gnuef/src/GFObjects.py:1.27 gnue/gnuef/src/GFObjects.py:1.28
--- gnue/gnuef/src/GFObjects.py:1.27 Thu Oct 26 14:59:54 2000
+++ gnue/gnuef/src/GFObjects.py Tue Oct 31 21:06:33 2000
@@ -283,12 +283,18 @@
self.dispatchEvent(GFEvent('notifyMASTERSWITCH',self))
self.dispatchEvent(GFEvent('recordSWITCHED',event.data))
+
def processCommit(self, event):
if GFOptions.DEBUG:
print "processing commit"
self.mode='commit'
self.dispatchEvent(GFEvent('switchRECORD',[self.currentRecord,self.currentRecord]));
self.dataSourceLink.commit()
+
+ # Switch to first record
+ self.currentRecord = 0
+ self.recordCount =
self.form.datasourceDictionary[self.datasource].getLastRecordNumber()
+ self.dispatchEvent(GFEvent('switchRECORD',[-1,self.currentRecord]))
self.mode='normal'
#
@@ -550,6 +556,11 @@
mask[self.dataConnection.uniqueKey] = \
mask[self.dataConnection.uniqueKey] * -1
self.dataConnection.delete(self.table,mask)
+ del self.resultSet[count]
+ del self.resultSetStatus[count]
+ if len(self.resultSet) == 0:
+ self.clear()
+
else:
if GFOptions.DEBUG:
print "Inserting the record"
@@ -576,8 +587,12 @@
self.resultSetStatus.append('saved')
def markForRemoval(self,recordNumber):
+ print "ID was ",self.resultSet[recordNumber][self.dataConnection.uniqueKey]
+ print "type was
",type(self.resultSet[recordNumber][self.dataConnection.uniqueKey])
+ print "Will now be
",int(self.resultSet[recordNumber][self.dataConnection.uniqueKey]) * -1
+
self.resultSet[recordNumber][self.dataConnection.uniqueKey] = \
- self.resultSet[recordNumber][self.dataConnection.uniqueKey] * -1
+ int(self.resultSet[recordNumber][self.dataConnection.uniqueKey]) * -1
self.resultSetStatus[recordNumber] = 'modified'
if GFOptions.DEBUG:
print "removing object: %s" %
(self.resultSet[recordNumber][self.dataConnection.uniqueKey])
Index: gnue/gnuef/src/UIwxpython.py
diff -u gnue/gnuef/src/UIwxpython.py:1.23 gnue/gnuef/src/UIwxpython.py:1.24
--- gnue/gnuef/src/UIwxpython.py:1.23 Thu Oct 26 14:59:54 2000
+++ gnue/gnuef/src/UIwxpython.py Tue Oct 31 21:06:33 2000
@@ -402,19 +402,46 @@
self.frame.SetStatusText( "Welcome to GNUe Forms! Would someone please
tell us we can stop coding?" )
- menu = wxMenu()
- menu.Append( 100, "&About..." )
- menu.AppendSeparator()
- menu.Append( 101, "E&xit" )
- menuBar = wxMenuBar()
- menuBar.Append( menu, "&File" )
- self.frame.SetMenuBar( menuBar );
+ fileMenu = wxMenu()
+ fileMenu.Append( 100, "Commit changes","Save all alterations to database")
+ EVT_MENU(self, 100, lambda event, l=self:
l.dispatchEvent(GFEvent('requestCOMMIT')))
+ fileMenu.AppendSeparator()
+ fileMenu.Append( 101, "E&xit", "Leave the program" )
+ EVT_MENU(self, 101, self.TimeToQuit)
+ dataMenu = wxMenu()
+ dataMenu.Append( 201, "Next record","Navigate to next record in memory")
+ EVT_MENU(self, 201, lambda event, l=self:
l.dispatchEvent(GFEvent('requestNEXTRECORD')))
+ dataMenu.Append( 202, "Previous record", "Navigate to previous record in
memory")
+ EVT_MENU(self, 202, lambda event, l=self:
l.dispatchEvent(GFEvent('requestPREVRECORD')))
+ dataMenu.Append( 203, "New record", "Create a new record for data input")
+ EVT_MENU(self, 203, lambda event, l=self:
l.dispatchEvent(GFEvent('requestNEWRECORD')))
+ dataMenu.Append( 204, "Mark for delete", "Mark record for removal at next
commit")
+ EVT_MENU(self, 204, lambda event, l=self:
l.dispatchEvent(GFEvent('requestDELETE')))
+ dataMenu.AppendSeparator()
+ dataMenu.Append( 205, "Next Block", "Move to next data block")
+ EVT_MENU(self, 205, lambda event, l=self:
l.dispatchEvent(GFEvent('requestNEXTBLOCK')))
+ dataMenu.Append( 206, "Previous Block", "Move to previous data block")
+ EVT_MENU(self, 206, lambda event, l=self:
l.dispatchEvent(GFEvent('requestPREVBLOCK')))
+ dataMenu.AppendSeparator()
+ dataMenu.Append( 207, "Enter Query", "Switch to input query mask mode")
+ EVT_MENU(self, 207, lambda event, l=self:
l.dispatchEvent(GFEvent('requestQUERY')))
+ dataMenu.Append( 208, "Execute Query", "Execute query using current mask")
+ EVT_MENU(self, 208, lambda event, l=self:
l.dispatchEvent(GFEvent('executeQUERY')))
+
+ helpMenu = wxMenu()
+ print "About: ", helpMenu.Append( 300, "&About...", "Display info about
gnuef" )
+ EVT_MENU(self, 300, self.OnAbout)
- EVT_MENU(self, 100, self.OnAbout)
- EVT_MENU(self, 101, self.TimeToQuit)
+
+ menuBar = wxMenuBar()
+ menuBar.Append( fileMenu, "&File" )
+ menuBar.Append( dataMenu, "&Data" )
+ menuBar.Append( helpMenu, "&Help" )
+
+ self.frame.SetMenuBar( menuBar );
self.frame.panel = wxPanel(self.frame,-1,
wxDefaultPosition,self.frame.GetSize())
self.frame.SetTitle(self.form.title)
@@ -438,6 +465,13 @@
"About Me", wxOK | wxICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
+
+ def menuHandler(self, event):
+ # hack for swig shortcomming
+ eo = event.GetEventObject()
+ object = wxPyTypeCast(eo, 'wxMenu')
+ print object.GetTitle()
+ print object.GetMenuItems()
def formAlert(self, event):
wxBell()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/gnuef README TODO samples/zipcode/pg_zip_c...,
James Thompson <=