[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/gnuef TODO src/GFForm.py src/GFObjects.py ...
From: |
James Thompson |
Subject: |
gnue/gnuef TODO src/GFForm.py src/GFObjects.py ... |
Date: |
Sat, 02 Jun 2001 18:29:45 -0700 |
CVSROOT: /cvs
Module name: gnue
Changes by: James Thompson <address@hidden> 01/06/02 18:29:45
Modified files:
gnuef : TODO
gnuef/src : GFForm.py GFObjects.py GFOptions.py
Log message:
Added new option autoCreate which makes forms automatically keep a
single
blank new record at the bottom (no more pushing F12 when this is set to
1)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/TODO.diff?cvsroot=OldCVS&tr1=1.50&tr2=1.51&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFForm.py.diff?cvsroot=OldCVS&tr1=1.95&tr2=1.96&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFObjects.py.diff?cvsroot=OldCVS&tr1=1.88&tr2=1.89&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFOptions.py.diff?cvsroot=OldCVS&tr1=1.29&tr2=1.30&r1=text&r2=text
Patches:
Index: gnue/gnuef/TODO
diff -u gnue/gnuef/TODO:1.50 gnue/gnuef/TODO:1.51
--- gnue/gnuef/TODO:1.50 Fri Jun 1 15:02:03 2001
+++ gnue/gnuef/TODO Sat Jun 2 18:29:45 2001
@@ -92,3 +92,6 @@
+
+
+
Index: gnue/gnuef/src/GFForm.py
diff -u gnue/gnuef/src/GFForm.py:1.95 gnue/gnuef/src/GFForm.py:1.96
--- gnue/gnuef/src/GFForm.py:1.95 Thu May 31 21:29:21 2001
+++ gnue/gnuef/src/GFForm.py Sat Jun 2 18:29:45 2001
@@ -260,14 +260,6 @@
GDebug.printMesg(1, "Trigger block Pre-Commit threw a
TriggerError!")
return "Block trigger returned error"
block.processTrigger('Post-Commit')
-
-# self.dispatchEvent(GFEvent('uiNEXTRECORD',self._currentEntry))
-# self._currentBlock.nextRecord()
-# self.dispatchEvent(GFEvent('uiPREVRECORD',self._currentEntry))
-# self._currentBlock.prevRecord()
-# self.dispatchEvent(GFEvent('gotoENTRY',self._currentEntry));
-# self.updateRecordStatus()
-# self.updateRecordCounter()
else:
message = 'Form is readonly'
return message
@@ -300,14 +292,8 @@
def rollback(self):
for block in self._blockList:
block.processRollback();
-# self.dispatchEvent(GFEvent('gotoENTRY',self._currentEntry));
-# self.dispatchEvent(GFEvent('uiNEXTRECORD',self._currentEntry))
self._currentBlock.nextRecord()
-# self.dispatchEvent(GFEvent('uiPREVRECORD',self._currentEntry))
self._currentBlock.prevRecord()
-# self.dispatchEvent(GFEvent('gotoENTRY',self._currentEntry));
-# self.updateRecordStatus()
-# self.updateRecordCounter()
#
# updateDetailBlocks
Index: gnue/gnuef/src/GFObjects.py
diff -u gnue/gnuef/src/GFObjects.py:1.88 gnue/gnuef/src/GFObjects.py:1.89
--- gnue/gnuef/src/GFObjects.py:1.88 Thu May 31 22:19:24 2001
+++ gnue/gnuef/src/GFObjects.py Sat Jun 2 18:29:45 2001
@@ -36,7 +36,9 @@
from GFEvent import *
from GFTrigger import *
import GFOptions
+from GFOptions import autoCreate # Major hack to get arround the issue that
this file creates a class GFOptions
from gnue.common import GDebug
+
import string
import types
@@ -293,13 +295,25 @@
def nextRecord(self):
self._recordCount = self._dataSourceLink.getLastRecordNumber()
self._currentRecord = self._currentRecord + 1
- if self._currentRecord > self._recordCount : self._currentRecord = 0
+ if self._currentRecord > self._recordCount :
+ if autoCreate and
(self._dataSourceLink.resultSetStatus[self._recordCount] != 'saved' or
+
self._dataSourceLink.resultSet[self._recordCount].has_key(self._dataSourceLink.uniqueKey)
+ ):
+ self.newRecord()
+ else:
+ self._currentRecord = 0
self.switchRecord(1)
def prevRecord(self):
self._recordCount = self._dataSourceLink.getLastRecordNumber()
self._currentRecord = self._currentRecord - 1
- if self._currentRecord < 0 : self._currentRecord = self._recordCount
+ if self._currentRecord < 0 :
+ if autoCreate and
(self._dataSourceLink.resultSetStatus[self._recordCount] != 'saved' or
+
self._dataSourceLink.resultSet[self._recordCount].has_key(self._dataSourceLink.uniqueKey)
+ ):
+ self.newRecord()
+ else:
+ self._currentRecord = self._recordCount
self.switchRecord(-1)
Index: gnue/gnuef/src/GFOptions.py
diff -u gnue/gnuef/src/GFOptions.py:1.29 gnue/gnuef/src/GFOptions.py:1.30
--- gnue/gnuef/src/GFOptions.py:1.29 Fri Jun 1 15:02:04 2001
+++ gnue/gnuef/src/GFOptions.py Sat Jun 2 18:29:45 2001
@@ -94,3 +94,7 @@
# Version
VERSION = "pre-0.0.8"
+
+# Create new records in blocks automagically when you hit the bottom
+autoCreate = 0
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/gnuef TODO src/GFForm.py src/GFObjects.py ...,
James Thompson <=