dabo Commit
Revision 6816
Date: 2011-09-01 11:13:57 -0700 (Thu, 01 Sep 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6816

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

Log:
setFocus works much better without the callafter.

Diff:
Modified: trunk/dabo/ui/uiwx/dPemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPemMixin.py     2011-08-31 22:40:39 UTC (rev 6815)
+++ trunk/dabo/ui/uiwx/dPemMixin.py     2011-09-01 18:13:57 UTC (rev 6816)
@@ -1296,21 +1296,9 @@
 
        def setFocus(self):
                """Sets focus to the object."""
-               # GotFocus for the next object fires before LostFocus for the 
current object,
-               # resulting in trouble if you call setFocus() inside your 
LostFocus code.
-               # Using a callAfter appears to solve the issue.
-               dabo.ui.callAfter(self._setFocusAfter)
+               self.SetFocus()
 
 
-       def _setFocusAfter(self):
-               """
-               Makes sure that the object is still 'live' before calling
-               its SetFocus() method.
-               """
-               if self:
-                       self.SetFocus()
-
-
        def __onUpdate(self, evt):
                """Update any dynamic properties, and then call the update() 
hook."""
                if isinstance(self, dabo.ui.deadObject) or not 
self._constructed():



_______________________________________________
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