dabo Commit
Revision 6736
Date: 2011-08-05 12:42:35 -0700 (Fri, 05 Aug 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6736

Changed:
U   trunk/dabo/ui/uiwx/dDataControlMixin.py

Log:
- Removed redundant Value property references.
- Change from the flushValue() to _afterValueChanged() method.

Diff:
Modified: trunk/dabo/ui/uiwx/dDataControlMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dDataControlMixin.py     2011-08-05 19:34:49 UTC (rev 
6735)
+++ trunk/dabo/ui/uiwx/dDataControlMixin.py     2011-08-05 19:42:35 UTC (rev 
6736)
@@ -69,9 +69,10 @@
 
        def _setValue(self, val):
                if self._constructed():
-                       if type(self.Value) != type(val):
-                               val = self._coerceValue(val, self.Value)
-                       if (type(self.Value) != type(val) or self.Value != val):
+                       currVal = self.Value
+                       if type(currVal) != type(val):
+                               val = self._coerceValue(val, currVal)
+                       if (type(currVal) != type(val) or currVal != val):
                                setter = self.SetValue
                                if hasattr(self, "ChangeValue"):
                                        setter = self.ChangeValue
@@ -81,7 +82,7 @@
                                        nm = self._name
                                        dabo.log.error(_("Could not set value 
of %(nm)s to %(val)s. Error message: %(e)s")
                                                        % locals())
-                       self.flushValue()
+                       self._afterValueChanged()
                else:
                        self._properties["Value"] = val
 



_______________________________________________
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