commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue gnue-common/src/GDataObjects.py gnuef/src/...


From: James Thompson
Subject: gnue gnue-common/src/GDataObjects.py gnuef/src/...
Date: Fri, 20 Jul 2001 09:21:09 -0700

CVSROOT:        /cvs
Module name:    gnue
Branch:         gnuef-new-datasources
Changes by:     James Thompson <address@hidden> 01/07/20 09:21:09

Modified files:
        gnue-common/src: GDataObjects.py 
        gnuef/src      : GFClient.py GFForm.py GFInstance.py 
        gnuef/src/GFObjects: GFBlock.py GFEntry.py GFLabel.py 

Log message:
        Misc bug fixes and still porting to new db system.  checkin to sync 
machines

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/GDataObjects.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.7.2.6&tr2=1.7.2.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFClient.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.24.2.2&tr2=1.24.2.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFForm.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.110.2.9&tr2=1.110.2.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFInstance.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.16.2.6&tr2=1.16.2.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFObjects/GFBlock.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.4.2.8&tr2=1.4.2.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFObjects/GFEntry.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.2.2.6&tr2=1.2.2.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFObjects/GFLabel.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.1.2.3&tr2=1.1.2.4&r1=text&r2=text

Patches:
Index: gnue/gnue-common/src/GDataObjects.py
diff -u gnue/gnue-common/src/GDataObjects.py:1.6 
gnue/gnue-common/src/GDataObjects.py:1.7
--- gnue/gnue-common/src/GDataObjects.py:1.6    Tue May 29 19:54:11 2001
+++ gnue/gnue-common/src/GDataObjects.py        Tue Jun  5 08:57:45 2001
@@ -127,8 +127,8 @@
     criteria = {}
     for i in range(0, len(self._masterfields)): 
       GDebug.printMesg(10,"Adding criteria")
-      criteria[string.trim(self._detailfields[i])] = \
-          master.current.getField(string.trim(self._masterfields[i]))
+      criteria[string.strip(self._detailfields[i])] = \
+          master.current.getField(string.strip(self._masterfields[i]))
       GDebug.printMesg(10,master.current.getField(self._masterfields[i]))
     return self.createResultSet(criteria)
 
Index: gnue/gnuef/src/GFClient.py
diff -u gnue/gnuef/src/GFClient.py:1.23 gnue/gnuef/src/GFClient.py:1.24
--- gnue/gnuef/src/GFClient.py:1.23     Fri Jun 29 17:59:05 2001
+++ gnue/gnuef/src/GFClient.py  Mon Jul  2 10:54:19 2001
@@ -34,7 +34,7 @@
 #
 # Copyright (c) 2000 Free Software Foundation
 #
-# $Id: GFClient.py,v 1.23 2001/06/30 00:59:05 jamest Exp $
+# $Id: GFClient.py,v 1.24 2001/07/02 17:54:19 jcater Exp $
 #
 
 import pstats
@@ -52,6 +52,7 @@
 from gnue.common import GDebug
 from gnue.common import GConfig
 from gnue.common.GClientApp import * 
+from gnue.forms import VERSION
 
 class GFClient(GClientApp):
   #
Index: gnue/gnuef/src/GFForm.py
diff -u gnue/gnuef/src/GFForm.py:1.112 gnue/gnuef/src/GFForm.py:1.113
--- gnue/gnuef/src/GFForm.py:1.112      Thu Jul 12 20:56:13 2001
+++ gnue/gnuef/src/GFForm.py    Mon Jul 16 20:09:41 2001
@@ -783,6 +783,16 @@
             return message
     self._currentBlock.nextRecord()
 
+  def jumpRecord(self,count):
+    for block in self._blockList:
+      if hasattr(block,'master'):
+        masterBlock,masterField = string.split(block.master,'.')
+        if masterBlock == self._currentBlock.name:
+          if not block.isSaved():
+            message = GConfig.get('_msgNOTSAVED')
+            return message
+    self._currentBlock.jumpRecord(count)
+
 
   def toggleInsertMode(self):
     self._insertMode = not self._insertMode
Index: gnue/gnuef/src/GFInstance.py
diff -u gnue/gnuef/src/GFInstance.py:1.17 gnue/gnuef/src/GFInstance.py:1.18
--- gnue/gnuef/src/GFInstance.py:1.17   Thu Jul 12 20:56:13 2001
+++ gnue/gnuef/src/GFInstance.py        Mon Jul 16 20:09:41 2001
@@ -34,7 +34,7 @@
 #
 # Copyright (c) 2000 Free Software Foundation
 #
-# $Id: GFInstance.py,v 1.17 2001/07/13 03:56:13 jcater Exp $
+# $Id: GFInstance.py,v 1.18 2001/07/17 03:09:41 jamest Exp $
 #
 
 import pstats
@@ -72,7 +72,7 @@
                            'requestPREVBLOCK'    : self.previousBlock,
                            'requestPREVRECORD'   : self.prevRecord,
                            'requestNEXTRECORD'   : self.nextRecord,
-                           'requestJUMPRECORD'   : self.jumpRecords,
+                           'requestRECORDNUMBER' : self.jumpRecords,
                            'requestPAGE'         : self.gotoPage,
                            
                            'requestKEYPRESS'     : self.keyPress,
@@ -225,12 +225,18 @@
   # form move an arbitrary number of records
   #
   def jumpRecords(self,event):
-    count = event.data
-    for jumps in range(abs(count)):
-      if count > 0:
-        self._form.nextRecord()
-      if count < 0:
-        self._form.prevRecord()
+    try:
+      count = abs(int(event.data))-1
+    except ValueError:
+      message = "Invalid numeric value entered."
+    else:
+      message = self._form.jumpRecord(count)
+
+    if message:
+      messageBox = GFMsgBox(self,message)
+      messageBox.show()
+      return                    
+
     
self.dispatchEvent(GFEvent('gotoENTRY',{'object':self._form._currentEntry}))
     self.updateRecordCounter()
     self.updateRecordStatus()
Index: gnue/gnuef/src/GFObjects/GFBlock.py
diff -u gnue/gnuef/src/GFObjects/GFBlock.py:1.5 
gnue/gnuef/src/GFObjects/GFBlock.py:1.6
--- gnue/gnuef/src/GFObjects/GFBlock.py:1.5     Mon Jul 16 20:09:41 2001
+++ gnue/gnuef/src/GFObjects/GFBlock.py Wed Jul 18 15:45:01 2001
@@ -31,8 +31,7 @@
 # Copyright (c) 2000 Free Software Foundation
 #
 
-from gnue.common.GObjects import * 
-from gnue.common.dbdrivers.factory import factory
+#from gnue.common.GObjects import * 
 from gnue.forms.GFEvent import *
 from gnue.forms.GFObjects.GFDataSource import GFDataSource
 
@@ -41,7 +40,6 @@
 from GFObj import GFObj
 
 import string
-import types
 
 # These should really go somewhere else
 TRUE = 1
Index: gnue/gnuef/src/GFObjects/GFEntry.py
diff -u gnue/gnuef/src/GFObjects/GFEntry.py:1.5 
gnue/gnuef/src/GFObjects/GFEntry.py:1.6
--- gnue/gnuef/src/GFObjects/GFEntry.py:1.5     Mon Jul 16 20:09:41 2001
+++ gnue/gnuef/src/GFObjects/GFEntry.py Wed Jul 18 15:45:01 2001
@@ -31,18 +31,10 @@
 # Copyright (c) 2000 Free Software Foundation
 #
 
-from gnue.common.GObjects import * 
-from gnue.common.dbdrivers.factory import factory
-
 from gnue.common import GDebug
 from gnue.common import GConfig
 from GFValue import GFValue
 import string
-import types
-
-# These should really go somewhere else
-TRUE = 1
-FALSE = 0
 
 ############################################################
 # GFEntry
Index: gnue/gnuef/src/GFObjects/GFLabel.py
diff -u gnue/gnuef/src/GFObjects/GFLabel.py:1.2 
gnue/gnuef/src/GFObjects/GFLabel.py:1.3
--- gnue/gnuef/src/GFObjects/GFLabel.py:1.2     Mon Jul 16 20:09:41 2001
+++ gnue/gnuef/src/GFObjects/GFLabel.py Wed Jul 18 15:45:01 2001
@@ -31,21 +31,9 @@
 # Copyright (c) 2000 Free Software Foundation
 #
 
-from gnue.common.GObjects import * 
-from gnue.common.dbdrivers.factory import factory
-
-from gnue.common import GDebug
 from gnue.common import GConfig
 from GFValue import GFValue
 
-import string
-import types
-
-
-# These should really go somewhere else
-TRUE = 1
-FALSE = 0
-
 #
 #GFLabel
 #
@@ -59,7 +47,6 @@
   def setValue(self, value):
     if not self._value:
       GFValue.setValue(self,value)
-
 
   def initialize(self):
     self._block = self.findParentOfType('GFBlock')



reply via email to

[Prev in Thread] Current Thread [Next in Thread]