dabo Commit
Revision 7030
Date: 2011-12-19 03:30:34 -0800 (Mon, 19 Dec 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/7030

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

Log:
- Removed unneeded imports.
- Moved dForm._activeControl value assignment code after the validation code.

Diff:
Modified: trunk/dabo/ui/dControlMixinBase.py
===================================================================
--- trunk/dabo/ui/dControlMixinBase.py  2011-12-15 19:37:01 UTC (rev 7029)
+++ trunk/dabo/ui/dControlMixinBase.py  2011-12-19 11:30:34 UTC (rev 7030)
@@ -1,27 +1,25 @@
 # -*- coding: utf-8 -*-
 """Provide behavior common to all dControls"""
 
-import dabo
 import dabo.ui
-from dabo.dLocalize import _
 import dabo.dEvents as dEvents
 
+
 class dControlMixinBase(dabo.ui.dPemMixin):
        """Provide common functionality for all controls."""
        def _initEvents(self):
                super(dControlMixinBase, self)._initEvents()
-
                self.bindEvent(dEvents.GotFocus, self.__onGotFocus)
 
        def __onGotFocus(self, evt):
                if self.Form:
-                         # Grab reference to current ActiveControl
+                       # Grab reference to current ActiveControl
                        sfac = self.Form.ActiveControl
                        # Set the form's ActiveControl reference
-                       self.Form._activeControl = self
-                       if sfac is not None and sfac is not self:
+                       if sfac != self:
                                # make sure prior control's value has been 
flushed
                                self.Form.activeControlValid()
+                               self.Form._activeControl = self
                if self.Parent:
                        self.Parent._activeControl = self
 



_______________________________________________
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