Author: reinhard
Date: 2007-05-08 14:36:54 -0500 (Tue, 08 May 2007)
New Revision: 9556
Modified:
trunk/gnue-forms/src/GFObjects/GFField.py
Log:
Added some comments about GFField trigger functions.
Modified: trunk/gnue-forms/src/GFObjects/GFField.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFField.py 2007-05-08 19:19:05 UTC (rev 9555)
+++ trunk/gnue-forms/src/GFObjects/GFField.py 2007-05-08 19:36:54 UTC (rev 9556)
@@ -106,13 +106,30 @@
# Trigger functions
self._triggerFunctions = {
- 'allowedValues' : {'function': self.allowedValues},
+ # Possibly all of them should be deprecated sooner or later.
+
+ # This is a ugly hack anyway and should not be necessary any more
+ # since now primary keys set by database triggers work nicely.
'autofillBySequence': {'function': self.triggerAutofillBySequence},
+
+ # This can be achieved by "field.value is None".
'isEmpty' : {'function': self.isEmpty},
+
+ # This will become obsolete as soon as the lookup datasource can be
+ # a block.
'resetForeignKey' : {'function': self.resetForeignKey},
+ 'allowedValues' : {'function': self.allowedValues},
+
+ # This gets and sets the DB value instead of the user value. For
+ # consistency, a different field that isn't a lookup should be used
+ # for that.
'get' : {'function': self.__get_value},
'set' : {'function': self.__set_value},
+
+ # Hmm... I'm not sure what this is useful for...
'clear' : {'function': self.resetToDefault},
+
+ # Use "value" property instead.
'getFKDescription' : {'function': self.get_value},
'setFKDescription' : {'function': self.set_value}}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.