[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src GDataSource.py
From: |
Jan Ischebeck |
Subject: |
gnue/common/src GDataSource.py |
Date: |
Sun, 10 Nov 2002 16:14:32 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jan Ischebeck <address@hidden> 02/11/10 16:14:32
Modified files:
common/src : GDataSource.py
Log message:
* add SetCondition and GetCondition trigger methods for
changing/reading the
staticCondition of a Datasource
* removed SingleEntry for GStaticSet to allow more than one
StaticDatasource in a source file
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GDataSource.py.diff?tr1=1.50&tr2=1.51&r1=text&r2=text
Patches:
Index: gnue/common/src/GDataSource.py
diff -c gnue/common/src/GDataSource.py:1.50 gnue/common/src/GDataSource.py:1.51
*** gnue/common/src/GDataSource.py:1.50 Sat Nov 9 21:59:33 2002
--- gnue/common/src/GDataSource.py Sun Nov 10 16:14:32 2002
***************
*** 81,87 ****
'call':{'function':self.callFuncOfCurrentRecordsetEntry,
'global':1,
},
!
}
def __getattr__(self, attr):
--- 81,88 ----
'call':{'function':self.callFuncOfCurrentRecordsetEntry,
'global':1,
},
! 'getCondition':{'function':self.getCondition},
! 'setCondition':{'function':self.setCondition},
}
def __getattr__(self, attr):
***************
*** 141,146 ****
--- 142,160 ----
else:
raise StandardError, \
_("Backend doesn't support the trigger 'call' function")
+
+ #
+ # get/set the static condition assosiated with a datasource
+ # the static condition is build out of the <condition> child
+ # elements below a datasource XML definition
+ #
+ def setCondition(mycondition):
+ dataObject._staticCondition = mycondition
+ # dataObject.invalidateCachedConditions()
+
+ def getCondition():
+ return dataObject._staticCondition
+
#
# This method should be called after the object is created
# but before any other methods are called
***************
*** 415,421 ****
'ParentTags': None },
'staticset': {
'BaseClass': GStaticSet,
! 'SingleInstance': 1,
'Attributes': {
'fields': {
'Typecast': GTypecast.text,
--- 429,437 ----
'ParentTags': None },
'staticset': {
'BaseClass': GStaticSet,
! # TODO: This should be replaced by a SingleInstanceInParentObject
! # instead of SingleInstance (in the whole file)
! # 'SingleInstance': 1,
'Attributes': {
'fields': {
'Typecast': GTypecast.text,