[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue common/src/GDataObjects.py common/src/GDat...
From: |
Jason Cater |
Subject: |
gnue common/src/GDataObjects.py common/src/GDat... |
Date: |
Wed, 03 Apr 2002 01:18:07 -0500 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/04/03 01:18:06
Modified files:
common/src : GDataObjects.py GDataSource.py GObjects.py
GTrigger.py GTriggerCore.py
forms/src : GFInstance.py GFTrigger.py
forms/src/GFObjects: GFBlock.py GFDataSource.py GFEntry.py
GFObj.py
reports/src : GRServices.py
Log message:
start of record-level block triggers (pre-commit, pre-update,
pre-insert, pre-delete, pre-modify)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/GDataObjects.py.diff?cvsroot=OldCVS&tr1=1.43&tr2=1.44&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/GDataSource.py.diff?cvsroot=OldCVS&tr1=1.27&tr2=1.28&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/GObjects.py.diff?cvsroot=OldCVS&tr1=1.29&tr2=1.30&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/GTrigger.py.diff?cvsroot=OldCVS&tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/GTriggerCore.py.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/src/GFInstance.py.diff?cvsroot=OldCVS&tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/src/GFTrigger.py.diff?cvsroot=OldCVS&tr1=1.54&tr2=1.55&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/src/GFObjects/GFBlock.py.diff?cvsroot=OldCVS&tr1=1.42&tr2=1.43&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/src/GFObjects/GFDataSource.py.diff?cvsroot=OldCVS&tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/src/GFObjects/GFEntry.py.diff?cvsroot=OldCVS&tr1=1.48&tr2=1.49&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/src/GFObjects/GFObj.py.diff?cvsroot=OldCVS&tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/src/GRServices.py.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gnue/common/src/GDataObjects.py
diff -c gnue/common/src/GDataObjects.py:1.43
gnue/common/src/GDataObjects.py:1.44
*** gnue/common/src/GDataObjects.py:1.43 Sun Feb 17 13:25:31 2002
--- gnue/common/src/GDataObjects.py Wed Apr 3 01:18:05 2002
***************
*** 16,22 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000, 2001 Free Software Foundation
#
# FILE:
# GDataObjects.py
--- 16,22 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000-2002 Free Software Foundation
#
# FILE:
# GDataObjects.py
***************
*** 557,563 ****
if self._emptyFlag:
return 0
else:
! return self._deleteFlag
# Returns 1=Record is pending an update
--- 557,563 ----
if self._emptyFlag:
return 0
else:
! return self._deleteFlag and not self._insertFlag
# Returns 1=Record is pending an update
***************
*** 573,579 ****
if self._emptyFlag:
return 0
else:
! return self._insertFlag
# Returns 1=Record is empty (inserted, but no data set)
--- 573,579 ----
if self._emptyFlag:
return 0
else:
! return self._insertFlag and not self._deleteFlag
# Returns 1=Record is empty (inserted, but no data set)
***************
*** 610,615 ****
--- 610,620 ----
flag = 1
self._modifiedFlags[fn] = flag
+ try:
+ self._parent._dataObject._dataSource._onModification(self)
+ except AttributeError:
+ pass
+
# Returns 1=Field has been modified
def isFieldModified(self, fieldName):
***************
*** 633,641 ****
GDebug.printMesg(5,'Preparing to post datasource %s' %
self._parent._dataObject.name)
if self.isPending():
GDebug.printMesg(5,'Posting datasource %s' %
self._parent._dataObject.name)
! self._postChanges()
# Post all detail records
for child in (self._cachedDetailResultSets.keys()):
--- 638,671 ----
GDebug.printMesg(5,'Preparing to post datasource %s' %
self._parent._dataObject.name)
+ # Save the initial status so we know if any triggers changed us
+ status = (self._insertFlag, self._deleteFlag, self._updateFlag)
+
+ # Call the hooks for commit-level hooks
+ if not self._emptyFlag and
hasattr(self._parent._dataObject,'_dataSource'):
+
+ if self._insertFlag and not self._deleteFlag:
+ self._parent._dataObject._dataSource._beforeCommitInsert(self)
+ elif self._deleteFlag and not self._insertFlag:
+ self._parent._dataObject._dataSource._beforeCommitDelete(self)
+ elif self._updateFlag:
+ self._parent._dataObject._dataSource._beforeCommitUpdate(self)
+
+ #
+ # If the record status changed while we were doing the triggers,
+ # start from the beginning and run the triggers again.
+ #
+ if status != (self._insertFlag, self._deleteFlag, self._updateFlag):
+ self.post()
+ return
+
+
if self.isPending():
GDebug.printMesg(5,'Posting datasource %s' %
self._parent._dataObject.name)
!
! if self.isPending():
! self._postChanges()
!
# Post all detail records
for child in (self._cachedDetailResultSets.keys()):
Index: gnue/common/src/GDataSource.py
diff -c gnue/common/src/GDataSource.py:1.27 gnue/common/src/GDataSource.py:1.28
*** gnue/common/src/GDataSource.py:1.27 Mon Feb 11 22:03:50 2002
--- gnue/common/src/GDataSource.py Wed Apr 3 01:18:05 2002
***************
*** 16,22 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000, 2001 Free Software Foundation
#
# FILE:
# GDataSource.py
--- 16,22 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000-2002 Free Software Foundation
#
# FILE:
# GDataSource.py
***************
*** 58,71 ****
self._fieldReferences = {}
self._unboundFieldReferences = {}
self._defaultValues = {}
!
self._inits =[self.primaryInit, self.secondaryInit]
self._currentResultSet = None
self._resultSetListeners = []
self._toplevelParent = None # Needs set by subclass so
# that _topObject gets set
self._topObject = None
!
#
# trigger support
#
--- 58,71 ----
self._fieldReferences = {}
self._unboundFieldReferences = {}
self._defaultValues = {}
!
self._inits =[self.primaryInit, self.secondaryInit]
self._currentResultSet = None
self._resultSetListeners = []
self._toplevelParent = None # Needs set by subclass so
# that _topObject gets set
self._topObject = None
!
#
# trigger support
#
***************
*** 98,104 ****
resultDict[key]=record.getField(key) or ""
returnList.append(resultDict)
return returnList
!
#
# This method should be called after the object is created
--- 98,104 ----
resultDict[key]=record.getField(key) or ""
returnList.append(resultDict)
return returnList
!
#
# This method should be called after the object is created
***************
*** 128,133 ****
--- 128,134 ----
self._dataObject._fieldReferences = self._fieldReferences
self._dataObject._unboundFieldReferences = self._unboundFieldReferences
self._dataObject._defaultValues = self._defaultValues
+ self._dataObject._dataSource = self
for child in self._children:
if isinstance(child, GConditions.GCondition):
self._dataObject._staticCondition = child
***************
*** 187,198 ****
#
# Master/detail stuff
#
!
# Called by dbdrivers whenever this datasource's master has changed
def masterResultSetChanged(self, masterResultSet, detailResultSet):
self._masterResultSet = masterResultSet
self.__setResultSet( detailResultSet )
!
def __setResultSet(self, resultSet):
self._currentResultSet = resultSet
# Notify all the listeners (i.e., blocks) that the result set changed
--- 188,199 ----
#
# Master/detail stuff
#
!
# Called by dbdrivers whenever this datasource's master has changed
def masterResultSetChanged(self, masterResultSet, detailResultSet):
self._masterResultSet = masterResultSet
self.__setResultSet( detailResultSet )
!
def __setResultSet(self, resultSet):
self._currentResultSet = resultSet
# Notify all the listeners (i.e., blocks) that the result set changed
***************
*** 201,207 ****
def registerResultSetListener(self, listener):
self._resultSetListeners.append(listener)
!
def primaryInit(self):
self._topObject = self.findParentOfType(self._toplevelParent)
GDebug.printMesg(10,"Setting %s to connect mgr %s"
%(self.name,self._topObject._connections))
--- 202,208 ----
def registerResultSetListener(self, listener):
self._resultSetListeners.append(listener)
!
def primaryInit(self):
self._topObject = self.findParentOfType(self._toplevelParent)
GDebug.printMesg(10,"Setting %s to connect mgr %s"
%(self.name,self._topObject._connections))
***************
*** 211,217 ****
# TODO: For now, adding to dtsrc to avoid a global namespace conflict
(jcater)
# TODO: I have not a clue to do with this at this time...originally from
GFDataSource.py
self.extensions = self._dataObject.triggerExtensions
!
# TODO: Merged into GDataSource per the TODOs in reports and forms however
# TODO: self._topObject._datasourceDictionary implies that the top object
# TODO: always has a specifc structure. This is a bad thing :( Maybe
GRootObj
--- 212,218 ----
# TODO: For now, adding to dtsrc to avoid a global namespace conflict
(jcater)
# TODO: I have not a clue to do with this at this time...originally from
GFDataSource.py
self.extensions = self._dataObject.triggerExtensions
!
# TODO: Merged into GDataSource per the TODOs in reports and forms however
# TODO: self._topObject._datasourceDictionary implies that the top object
# TODO: always has a specifc structure. This is a bad thing :( Maybe
GRootObj
***************
*** 231,237 ****
raise StandardError, \
"Detail source '%s' references non-existant master '%s'" \
% (self.name, self.master)
!
######
#
#
--- 232,259 ----
raise StandardError, \
"Detail source '%s' references non-existant master '%s'" \
% (self.name, self.master)
!
!
! #
! # Hooks for record-level triggers
! #
!
! def _beforeCommitInsert(self, record):
! return 1
!
! def _beforeCommitUpdate(self, record):
! return 1
!
! def _beforeCommitDelete(self, record):
! return 1
!
! def _onModification(self, record):
! return 1
!
! def _onNewRecordQueried(self, record):
! return 1
!
!
######
#
#
Index: gnue/common/src/GObjects.py
diff -c gnue/common/src/GObjects.py:1.29 gnue/common/src/GObjects.py:1.30
*** gnue/common/src/GObjects.py:1.29 Mon Mar 25 23:34:20 2002
--- gnue/common/src/GObjects.py Wed Apr 3 01:18:05 2002
***************
*** 16,22 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000, 2001 Free Software Foundation
#
#
# FILE:
--- 16,22 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000-2002 Free Software Foundation
#
#
# FILE:
Index: gnue/common/src/GTrigger.py
diff -c gnue/common/src/GTrigger.py:1.10 gnue/common/src/GTrigger.py:1.11
*** gnue/common/src/GTrigger.py:1.10 Sat Feb 9 23:43:04 2002
--- gnue/common/src/GTrigger.py Wed Apr 3 01:18:05 2002
***************
*** 16,22 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000, 2001, 2002 Free Software Foundation
#
#
# FILE:
--- 16,22 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000-2002 Free Software Foundation
#
#
# FILE:
Index: gnue/common/src/GTriggerCore.py
diff -c gnue/common/src/GTriggerCore.py:1.4 gnue/common/src/GTriggerCore.py:1.5
*** gnue/common/src/GTriggerCore.py:1.4 Fri Feb 1 00:07:14 2002
--- gnue/common/src/GTriggerCore.py Wed Apr 3 01:18:05 2002
***************
*** 16,22 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000, 2001, 2002 Free Software Foundation
#
#
# FILE:
--- 16,22 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000-2002 Free Software Foundation
#
#
# FILE:
Index: gnue/forms/src/GFInstance.py
diff -c gnue/forms/src/GFInstance.py:1.40 gnue/forms/src/GFInstance.py:1.41
*** gnue/forms/src/GFInstance.py:1.40 Tue Apr 2 22:46:58 2002
--- gnue/forms/src/GFInstance.py Wed Apr 3 01:18:05 2002
***************
*** 1,6 ****
#
- # Copyright 2001-2002 Free Software Foundation
- #
# This file is part of GNU Enterprise.
#
# GNU Enterprise is free software; you can redistribute it
--- 1,4 ----
***************
*** 18,23 ****
--- 16,23 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
+ # Copyright 2001-2002 Free Software Foundation
+ #
# FILE:
# GFInstance.py
#
***************
*** 61,66 ****
--- 61,73 ----
# Incoming events
self.registerEventListeners( {
+ # Datasource trigger events
+ 'preCommit' : self.preCommit,
+ 'preUpdate' : self.preUpdate,
+ 'preInsert' : self.preInsert,
+ 'preDelete' : self.preDelete,
+ 'onRecordTouched' : self.onRecordTouched,
+
# Focus-related events
'requestNEXTENTRY' : self.nextEntry,
'requestPREVENTRY' : self.previousEntry,
***************
*** 561,566 ****
--- 568,609 ----
self.dispatchEvent(GFEvent('gotoENTRY',{'object':self._form._currentEntry}))
self.updateRecordStatus()
self.updateRecordCounter()
+
+
+
+ def _handlePreCommit(self, event, trigger):
+ try:
+ block = event.record._parent._block
+ except AttributeError:
+ return
+
+ saveMode = block.mode
+ block._precommitRecord = event.record
+ block.mode = 'precommit'
+ block.processTrigger(trigger)
+ block.mode = saveMode
+
+
+ def preCommit(self, event):
+ self._handlePreCommit(event, 'pre-commit')
+
+
+ def preInsert(self, event):
+ self._handlePreCommit(event, 'pre-insert')
+
+
+ def preUpdate(self, event):
+ self._handlePreCommit(event, 'pre-update')
+
+
+ def preDelete(self, event):
+ self._handlePreCommit(event, 'pre-delete')
+
+
+ def onRecordTouched(self, event):
+ self._handlePreCommit(event, 'pre-modify')
+
+
#
# fireTrigger
Index: gnue/forms/src/GFObjects/GFBlock.py
diff -c gnue/forms/src/GFObjects/GFBlock.py:1.42
gnue/forms/src/GFObjects/GFBlock.py:1.43
*** gnue/forms/src/GFObjects/GFBlock.py:1.42 Tue Apr 2 22:46:58 2002
--- gnue/forms/src/GFObjects/GFBlock.py Wed Apr 3 01:18:06 2002
***************
*** 10,21 ****
#
# GNU Enterprise is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
#
--- 10,21 ----
#
# GNU Enterprise is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
#
***************
*** 186,191 ****
--- 186,192 ----
self._resultSet = resultSet
self._currentRecord = -1
self._recordCount = 0
+ resultSet._block = self
if self._resultSet.firstRecord():
self.switchRecord(0)
***************
*** 323,329 ****
elif self._query2:
self._query2 = 0
self._queryValues = {}
! for key in self._lastQueryValues.keys():
self._queryValues[key] = self._lastQueryValues[key]
self.switchRecord(0)
else:
--- 324,330 ----
elif self._query2:
self._query2 = 0
self._queryValues = {}
! for key in self._lastQueryValues.keys():
self._queryValues[key] = self._lastQueryValues[key]
self.switchRecord(0)
else:
***************
*** 331,340 ****
self.switchRecord(0)
# Removed to allow the GFForm object to deside when to clear the block
! # self.processRollback()
!
def processQuery(self):
! # Implement sloppyQuery system
if self.mode == 'query':
for entry in self._entryList:
if hasattr(entry,'sloppyQuery'):
--- 332,341 ----
self.switchRecord(0)
# Removed to allow the GFForm object to deside when to clear the block
! # self.processRollback()
!
def processQuery(self):
! # Implement sloppyQuery system
if self.mode == 'query':
for entry in self._entryList:
if hasattr(entry,'sloppyQuery'):
***************
*** 344,354 ****
if letter != "%":
newValue += letter+"%"
entry.setValue(newValue)
!
self.mode = 'normal'
self._lastQueryValues = {}
! for key in self._queryValues.keys():
self._lastQueryValues[key] = self._queryValues[key]
conditionLike = {}
--- 345,355 ----
if letter != "%":
newValue += letter+"%"
entry.setValue(newValue)
!
self.mode = 'normal'
self._lastQueryValues = {}
! for key in self._queryValues.keys():
self._lastQueryValues[key] = self._queryValues[key]
conditionLike = {}
***************
*** 356,366 ****
# 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]
! else:
GDebug.printMesg(5,'Adding conditional AND (%s=%s)' %
(entry.field, self._queryValues[entry]))
conditionEq[entry.field] = self._queryValues[entry]
--- 357,367 ----
# 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]
! else:
GDebug.printMesg(5,'Adding conditional AND (%s=%s)' %
(entry.field, self._queryValues[entry]))
conditionEq[entry.field] = self._queryValues[entry]
Index: gnue/forms/src/GFObjects/GFDataSource.py
diff -c gnue/forms/src/GFObjects/GFDataSource.py:1.13
gnue/forms/src/GFObjects/GFDataSource.py:1.14
*** gnue/forms/src/GFObjects/GFDataSource.py:1.13 Sun Feb 17 14:54:06 2002
--- gnue/forms/src/GFObjects/GFDataSource.py Wed Apr 3 01:18:06 2002
***************
*** 1,9 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
# GNU Enterprise is distributed in the hope that it will be
--- 1,9 ----
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
# GNU Enterprise is distributed in the hope that it will be
***************
*** 16,22 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000, 2001 Free Software Foundation
#
#
# FILE:
--- 16,22 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000-2002 Free Software Foundation
#
#
# FILE:
***************
*** 31,36 ****
--- 31,37 ----
#
from gnue.common.GDataSource import GDataSource
+ from GFEvent import GFEvent
############################################################
# GFDataSource
***************
*** 40,46 ****
--- 41,74 ----
def __init__(self, parent):
GDataSource.__init__(self, parent, 'GFDataSource')
self._toplevelParent = 'GFForm'
+ self._form = self.findParentOfType('GFForm')
+
+ #
+ # Hooks for record-level triggers
+ #
+
+ def _beforeCommitInsert(self, record):
+ self._form.dispatchEvent(GFEvent('PreInsert', record=record))
+ self._form.dispatchEvent(GFEvent('PreCommit', record=record))
+
+ def _beforeCommitUpdate(self, record):
+ self._form.dispatchEvent(GFEvent('PreUpdate', record=record))
+ self._form.dispatchEvent(GFEvent('PreCommit', record=record))
+
+ def _beforeCommitDelete(self, record):
+ self._form.dispatchEvent(GFEvent('PreDelete', record=record))
+ self._form.dispatchEvent(GFEvent('PreCommit', record=record))
+
+ def _onModification(self, record):
+ try:
+ record.__firstModification
+ except NameError:
+ record.__firstModification = 1
+ self._form.dispatchEvent(GFEvent('OnRecordTouched', record))
+
+ def _onNewRecordQueried(self, record):
+ return 1
Index: gnue/forms/src/GFObjects/GFEntry.py
diff -c gnue/forms/src/GFObjects/GFEntry.py:1.48
gnue/forms/src/GFObjects/GFEntry.py:1.49
*** gnue/forms/src/GFObjects/GFEntry.py:1.48 Tue Apr 2 22:46:58 2002
--- gnue/forms/src/GFObjects/GFEntry.py Wed Apr 3 01:18:06 2002
***************
*** 190,195 ****
--- 190,199 ----
value = self._block._queryValues[self]
else:
value = None
+
+ elif self._block.mode == 'precommit':
+ value = self._block._precommitRecord.getField(self.field)
+
else:
value = self._block._resultSet.current.getField(self.field)
else:
***************
*** 214,219 ****
--- 218,227 ----
self._oldval = value
if self._block.mode == 'query':
self._block._queryValues[self] = value
+
+ elif self._block.mode == 'precommit':
+ value = self._block._precommitRecord.setField(self.field,value)
+
else:
self._block._resultSet.current.setField(self.field,value)
self._block._form.updateUIEntry(self)
Index: gnue/forms/src/GFObjects/GFObj.py
diff -c gnue/forms/src/GFObjects/GFObj.py:1.9
gnue/forms/src/GFObjects/GFObj.py:1.10
*** gnue/forms/src/GFObjects/GFObj.py:1.9 Tue Apr 2 22:46:58 2002
--- gnue/forms/src/GFObjects/GFObj.py Wed Apr 3 01:18:06 2002
***************
*** 8,14 ****
#
# GNU Enterprise is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
--- 8,14 ----
#
# GNU Enterprise is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
***************
*** 16,22 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000, 2001 Free Software Foundation
#
#
# FILE:
--- 16,22 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000-2002 Free Software Foundation
#
#
# FILE:
Index: gnue/forms/src/GFTrigger.py
diff -c gnue/forms/src/GFTrigger.py:1.54 gnue/forms/src/GFTrigger.py:1.55
*** gnue/forms/src/GFTrigger.py:1.54 Fri Feb 15 22:57:55 2002
--- gnue/forms/src/GFTrigger.py Wed Apr 3 01:18:05 2002
***************
*** 41,47 ****
#
# A list of all valid triggers, and their "pretty" names
#
! VALIDTRIGGERS = { 'PRE-FOCUSOUT': 'Pre-FocusOut',
'POST-FOCUSOUT': 'Post-FocusOut',
'PRE-FOCUSIN': 'Pre-FocusIn',
'POST-FOCUSIN': 'Post-FocusIn',
--- 41,47 ----
#
# A list of all valid triggers, and their "pretty" names
#
! VALIDTRIGGERS = { 'PRE-FOCUSOUT': 'Pre-FocusOut',
'POST-FOCUSOUT': 'Post-FocusOut',
'PRE-FOCUSIN': 'Pre-FocusIn',
'POST-FOCUSIN': 'Post-FocusIn',
***************
*** 50,57 ****
'POST-QUERY': 'Post-Query',
'ON-SWITCH': 'On-Switch',
'PRE-CHANGE': 'Pre-Change',
! 'POST-CHANGE': 'Post-Change',
! 'ON-NEWRECORD': 'On-NewRecord' }
#
# GFTriggerAware
--- 50,61 ----
'POST-QUERY': 'Post-Query',
'ON-SWITCH': 'On-Switch',
'PRE-CHANGE': 'Pre-Change',
! 'POST-CHANGE': 'Post-Change',
! 'PRE-UPDATE': 'Pre-Update',
! 'PRE-INSERT': 'Pre-Insert',
! 'PRE-DELETE': 'Pre-Delete',
! 'PRE-MODIFY': 'Pre-Modify',
! 'ON-NEWRECORD': 'On-NewRecord' }
#
# GFTriggerAware
Index: gnue/reports/src/GRServices.py
diff -c gnue/reports/src/GRServices.py:1.4 gnue/reports/src/GRServices.py:1.5
*** gnue/reports/src/GRServices.py:1.4 Mon Mar 25 23:34:07 2002
--- gnue/reports/src/GRServices.py Wed Apr 3 01:18:06 2002
***************
*** 27,39 ****
# NOTES:
#
! string
! boolean
! set
! binary
! float
! integer
! datetime
ExportedServices = (
--- 27,39 ----
# NOTES:
#
! ## string
! ## boolean
! ## set
! ## binary
! ## float
! ## integer
! ## datetime
ExportedServices = (
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue common/src/GDataObjects.py common/src/GDat...,
Jason Cater <=