dabo Commit
Revision 5970
Date: 2010-09-01 05:11:56 -0700 (Wed, 01 Sep 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5970

Changed:
U   trunk/dabo/ui/uiwx/dForm.py
U   trunk/dabo/ui/uiwx/dFormMixin.py

Log:
Moved the recent additions of field validation flags from dForm to dFormMixin.


Diff:
Modified: trunk/dabo/ui/uiwx/dForm.py
===================================================================
--- trunk/dabo/ui/uiwx/dForm.py 2010-09-01 11:49:06 UTC (rev 5969)
+++ trunk/dabo/ui/uiwx/dForm.py 2010-09-01 12:11:56 UTC (rev 5970)
@@ -55,8 +55,6 @@
                self._holdStatusText = ""
                # Holds the dataSource passed to the method
                self.dataSourceParameter = None
-               # Flag to prevent infinite loops when doing field-level 
validation
-               self._fieldValidationControl = None
 
 
        def _beforeSetProperties(self, props):

Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py    2010-09-01 11:49:06 UTC (rev 5969)
+++ trunk/dabo/ui/uiwx/dFormMixin.py    2010-09-01 12:11:56 UTC (rev 5970)
@@ -68,6 +68,8 @@
                self._defaultWidth = 600
                self._defaultHeight = 500
                self._defaultState = "Normal"
+               # Flag to prevent infinite loops when doing field-level 
validation
+               self._fieldValidationControl = None
 
                super(dFormMixin, self).__init__(preClass, parent, properties, 
                                attProperties, *args, **kwargs)
@@ -163,6 +165,12 @@
                else:
                        self.raiseEvent(dEvents.Deactivate, evt)
                evt.Skip()
+
+
+       def _controlGotFocus(self, ctrl):
+               if self._fieldValidationControl is ctrl:
+                       # Clear it
+                       self._fieldValidationControl = None
                        
                        
        def Maximize(self, maximize=True, *args, **kwargs):



_______________________________________________
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