dabo Commit
Revision 7059
Date: 2012-01-20 14:41:11 -0800 (Fri, 20 Jan 2012)
Author: Paul
Trac: http://trac.dabodev.com/changeset/7059

Changed:
U   trunk/dabo/ui/dDataControlMixinBase.py

Log:
r7055 introduced problem flushing value from drop down lists. For now, I'm 
reverting the entire commit. It appears we need to allow the recursive 
flushvalue in this case.


Diff:
Modified: trunk/dabo/ui/dDataControlMixinBase.py
===================================================================
--- trunk/dabo/ui/dDataControlMixinBase.py      2012-01-20 21:00:56 UTC (rev 
7058)
+++ trunk/dabo/ui/dDataControlMixinBase.py      2012-01-20 22:41:11 UTC (rev 
7059)
@@ -213,8 +213,6 @@
                Save any changes to the underlying source field. First check to 
make sure
                that any changes are validated.
                """
-               if getattr(self, "_from_flushValue", False):
-                       return True
                # We need to test empty oldvals because of the way that 
textboxes work; they
                # can set _oldVal to "" before the actual Value is set.
                if (not self._oldVal) or (self._oldVal != self.Value):
@@ -248,10 +246,6 @@
                                isChanged = (abs(curVal - oldVal) > 0.0000001)
                        else:
                                isChanged = (curVal != oldVal)
-               # In some situations, e.g. if control is bound to widget 
property, changes of property
-               # value can cause recursive call to the flushValue() method.
-               # To prevent such situation we have to check the 
_from_flushValue attribute at the beginning.
-               self._from_flushValue = True
                if isChanged:
                        if not self._DesignerMode:
                                if (self.DataSource or 
isinstance(self.DataSource, dabo.dPref)) and self.DataField:
@@ -298,6 +292,7 @@
                                                                        nm = 
ustr(self.DataSource)
                                                                
dabo.log.error("Could not bind to '%s.%s'\nReason: %s" % (nm, self.DataField, 
e))
                        self._oldVal = curVal
+                       self._from_flushValue = True
                        self._afterValueChanged()
                        self._from_flushValue = False
                        # Raise an event so that user code can react if needed:



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to