[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/gnuef/src GFForm.py GFObjects/GFDataSource.py
From: |
Jason Cater |
Subject: |
gnue/gnuef/src GFForm.py GFObjects/GFDataSource.py |
Date: |
Thu, 08 Nov 2001 02:56:22 -0500 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 01/11/08 02:56:22
Modified files:
gnuef/src : GFForm.py
gnuef/src/GFObjects: GFDataSource.py
Log message:
fix initialization issue with master/detail records
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFForm.py.diff?cvsroot=OldCVS&tr1=1.128&tr2=1.129&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFObjects/GFDataSource.py.diff?cvsroot=OldCVS&tr1=1.10&tr2=1.11&r1=text&r2=text
Patches:
Index: gnue/gnuef/src/GFForm.py
diff -u gnue/gnuef/src/GFForm.py:1.128 gnue/gnuef/src/GFForm.py:1.129
--- gnue/gnuef/src/GFForm.py:1.128 Sun Nov 4 17:04:48 2001
+++ gnue/gnuef/src/GFForm.py Thu Nov 8 02:56:21 2001
@@ -73,7 +73,8 @@
self._triggerns['FALSE'] = 0
self._triggerns['GFMsgBox'] = GFMsgBox
- self._inits = [self.primaryInit, self.secondaryInit]
+ # The "None" init gives datasources time to setup master/detail
+ self._inits = [self.primaryInit, None, self.secondaryInit]
def _buildObject(self):
@@ -116,8 +117,11 @@
# create the first records
for key in self._datasourceDictionary.keys():
if not self._datasourceDictionary[key].hasMaster():
+ print "**Creating empty record for %s" % key
self._datasourceDictionary[key].createEmptyResultSet()
+
+
#
# begin routines made for walking
#
@@ -240,13 +244,13 @@
object.__dict__[id] == find.__dict__[id]:
return object
elif hasattr(object,'_children'):
- rv = None
+ rv = None
for child in object._children:
rv = self.__findImportItem(find, child, id)
- if rv:
+ if rv:
break
return rv
- else:
+ else:
return None
#
@@ -262,10 +266,10 @@
if block.name == blockname:
value = block._dataSourceLink.getField(block._currentRecord,fieldname)
GDebug.printMesg(2,"block %s with field %s found. Value is %s" %
(block.name, fieldname, value))
-
+
return value
return None
-
+
#
# Incomming Event handlers
#
@@ -355,9 +359,9 @@
message = "Database commit error:\n%s\n%s " % (sys.exc_info()[0],
sys.exc_info()[1])
except:
print "\n\nGFForm: Unexpected Exception:"
- print '-'*60
- traceback.print_exc(file=sys.stdout)
- print '-'*60
+ print '-'*60
+ traceback.print_exc(file=sys.stdout)
+ print '-'*60
self._app.dispatchEvent(GFEvent('endWAIT',None));
@@ -598,7 +602,7 @@
if object.getObjectType()=='GFEntry' and not object.hidden and (not
object.readonly or self._currentBlock.mode=='query'):
nextEntry = object
lastEntry = object
-
+
keepNext = 0
for object in self._currentEntry._parent._children:
# Put the first field as the next to rollover
@@ -674,7 +678,7 @@
for object in self._blockList:
if object == self._currentBlock:
break
-
+
nextBlock = object
try:
self._currentBlock.processTrigger('Pre-FocusOut')
Index: gnue/gnuef/src/GFObjects/GFDataSource.py
diff -u gnue/gnuef/src/GFObjects/GFDataSource.py:1.10
gnue/gnuef/src/GFObjects/GFDataSource.py:1.11
--- gnue/gnuef/src/GFObjects/GFDataSource.py:1.10 Wed Oct 10 00:48:02 2001
+++ gnue/gnuef/src/GFObjects/GFDataSource.py Thu Nov 8 02:56:22 2001
@@ -60,7 +60,9 @@
self.initialize()
self.connect()
# TODO Removing for now - jamest
- #self._form._triggerns[self.name] = self._dataObject.triggerExtensions
+ #self._form._triggerns["%s" % self.name] =
self._dataObject.triggerExtensions
+ # TODO: For now, adding to dtsrc to avoid a global namespace conflict
(jcater)
+ self.extensions = self._dataObject.triggerExtensions
# TODO: The linking of master to detail should occur in GDataSource
# TODO: as both Forms and Reports is executing basically the same code...
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/gnuef/src GFForm.py GFObjects/GFDataSource.py,
Jason Cater <=