commit-gnue
[Top][All Lists]
Advanced

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

gnue common/src/dbdrivers/_dbsig/DBdriver.py fo...


From: James Thompson
Subject: gnue common/src/dbdrivers/_dbsig/DBdriver.py fo...
Date: Sat, 13 Apr 2002 12:08:39 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     James Thompson <address@hidden> 02/04/13 12:08:39

Modified files:
        common/src/dbdrivers/_dbsig: DBdriver.py 
        forms/src/GFObjects: GFBlock.py 
        forms/src/uidrivers/wx: UIdriver.py 

Log message:
        Fixed invalid int value error in record jumps
        Misc cleanup

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/_dbsig/DBdriver.py.diff?tr1=1.44&tr2=1.45&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFObjects/GFBlock.py.diff?tr1=1.45&tr2=1.46&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/wx/UIdriver.py.diff?tr1=1.161&tr2=1.162&r1=text&r2=text

Patches:
Index: gnue/common/src/dbdrivers/_dbsig/DBdriver.py
diff -c gnue/common/src/dbdrivers/_dbsig/DBdriver.py:1.44 
gnue/common/src/dbdrivers/_dbsig/DBdriver.py:1.45
*** gnue/common/src/dbdrivers/_dbsig/DBdriver.py:1.44   Sun Mar 31 14:38:05 2002
--- gnue/common/src/dbdrivers/_dbsig/DBdriver.py        Sat Apr 13 12:08:39 2002
***************
*** 55,62 ****
        # Set _initialData to be the just-now posted values
        if not self._deleteFlag:
          self._initialData = {}
!         for key in self._fields.keys():
!           self._initialData[key] = self._fields[key]
  
      except self._parent._dataObject._DatabaseError, err:
        raise GDataObjects.ConnectionError, err
--- 55,61 ----
        # Set _initialData to be the just-now posted values
        if not self._deleteFlag:
          self._initialData = {}
!         self._initialData.update(self._fields)
  
      except self._parent._dataObject._DatabaseError, err:
        raise GDataObjects.ConnectionError, err
Index: gnue/forms/src/GFObjects/GFBlock.py
diff -c gnue/forms/src/GFObjects/GFBlock.py:1.45 
gnue/forms/src/GFObjects/GFBlock.py:1.46
*** gnue/forms/src/GFObjects/GFBlock.py:1.45    Fri Apr 12 22:25:39 2002
--- gnue/forms/src/GFObjects/GFBlock.py Sat Apr 13 12:08:39 2002
***************
*** 303,316 ****
        self.mode = 'query'
        self._query2 = int(GConfig.get("RememberLastQuery","1"))
        self._queryValues = {}
!       for entry in self._queryDefaults.keys():
!         entry.setValue(self._queryDefaults[entry])
        self.switchRecord(0)
      elif self._query2:
        self._query2 = 0
        self._queryValues = {}
!       for key in self._lastQueryValues.keys():
!         self._queryValues[key] = self._lastQueryValues[key]
        self.switchRecord(0)
      else:
        self.mode = 'normal'
--- 303,314 ----
        self.mode = 'query'
        self._query2 = int(GConfig.get("RememberLastQuery","1"))
        self._queryValues = {}
!       self._queryValues.update(self._queryDefaults)
        self.switchRecord(0)
      elif self._query2:
        self._query2 = 0
        self._queryValues = {}
!       self._queryValues.update(self._lastQueryValues)
        self.switchRecord(0)
      else:
        self.mode = 'normal'
***************
*** 334,348 ****
        self.mode = 'normal'
  
        self._lastQueryValues = {}
!       for key in self._queryValues.keys():
!         self._lastQueryValues[key] = self._queryValues[key]
  
        conditionLike = {}
        conditionEq = {}
  
        # Get all the user-supplied parameters from the entry widgets
        for entry in self._queryValues.keys():
!         if entry._bound and len(str(self._queryValues[entry])) and 
entry.isQueryable():
            if entry.typecast == 'text':
              GDebug.printMesg(5,'Adding conditional LIKE (%s like %s)' % 
(entry.field, self._queryValues[entry]))
              conditionLike[entry.field] = self._queryValues[entry]
--- 332,345 ----
        self.mode = 'normal'
  
        self._lastQueryValues = {}
!       self._lastQueryValues.update(self._queryValues)
  
        conditionLike = {}
        conditionEq = {}
  
        # Get all the user-supplied parameters from the entry widgets
        for entry in self._queryValues.keys():
!         if entry._bound and entry.isQueryable() and 
len(str(self._queryValues[entry])):
            if entry.typecast == 'text':
              GDebug.printMesg(5,'Adding conditional LIKE (%s like %s)' % 
(entry.field, self._queryValues[entry]))
              conditionLike[entry.field] = self._queryValues[entry]
Index: gnue/forms/src/uidrivers/wx/UIdriver.py
diff -c gnue/forms/src/uidrivers/wx/UIdriver.py:1.161 
gnue/forms/src/uidrivers/wx/UIdriver.py:1.162
*** gnue/forms/src/uidrivers/wx/UIdriver.py:1.161       Thu Apr  4 10:44:52 2002
--- gnue/forms/src/uidrivers/wx/UIdriver.py     Sat Apr 13 12:08:39 2002
***************
*** 500,507 ****
      dlg = wxTextEntryDialog(self.mainWindow, 'Enter record number to jump to',
                                                          'Which record?')
      if dlg.ShowModal() == wxID_OK:
!       self.dispatchEvent(GFEvent('requestRECORDNUMBER', dlg.GetValue()))
!       dlg.Destroy()
  
    #
    # closeTrap
--- 500,511 ----
      dlg = wxTextEntryDialog(self.mainWindow, 'Enter record number to jump to',
                                                          'Which record?')
      if dlg.ShowModal() == wxID_OK:
!       action = self.dispatchEvent(GFEvent('requestRECORDNUMBER', 
dlg.GetValue()))
!     else:
!       action = None
!       
!     dlg.Destroy()
!     return action
  
    #
    # closeTrap
***************
*** 997,1010 ****
          event.ControlDown(),
          event.AltDown())
  
- 
-     # TODO : Broken for the moment, this should probably be form driven
      if command == 'JUMPRECORD':
        global _PROMPTFORRECORD
!       _PROMPTFORRECORD()
! 
        
!     if command == 'NEWLINE':
        action = GFEvent('requestKEYPRESS', '\n',
                       text='\n',
                       code=10)
--- 1001,1011 ----
          event.ControlDown(),
          event.AltDown())
  
      if command == 'JUMPRECORD':
        global _PROMPTFORRECORD
!       action = _PROMPTFORRECORD()
        
!     elif command == 'NEWLINE':
        action = GFEvent('requestKEYPRESS', '\n',
                       text='\n',
                       code=10)



reply via email to

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