dabo Commit
Revision 6648
Date: 2011-07-02 10:13:59 -0700 (Sat, 02 Jul 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6648

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

Log:
Removed passing wx native event object as uiEvent parameter from Dabo 
GotFocus/LostFocus events to prevent random interpreter crashes and problems 
with GC.

Diff:
Modified: trunk/dabo/ui/uiwx/dRadioList.py
===================================================================
--- trunk/dabo/ui/uiwx/dRadioList.py    2011-07-02 10:26:24 UTC (rev 6647)
+++ trunk/dabo/ui/uiwx/dRadioList.py    2011-07-02 17:13:59 UTC (rev 6648)
@@ -186,7 +186,8 @@
                now = time.time()
                if now - self._lastLostFocusEvent > .01:
                        # Newly focused; raise the event.
-                       self.raiseEvent(dEvents.GotFocus, wxEvt)
+                       # Missing uiEvent parameter in call? See note below.
+                       self.raiseEvent(dEvents.GotFocus)
                self._lastGotFocusEvent = now
 
 
@@ -203,7 +204,11 @@
                                # Doing it on Windows platform raises global 
Python exception.
                                app = self.Application
                                if app is None or app.ActiveForm == self.Form:
-                                       self.raiseEvent(dEvents.LostFocus, 
wxEvt)
+                                       # Passing wxEvt as uiEvent parameter 
under some conditions
+                                       # causes Python interpreter crash or 
unspecified problems
+                                       # with GC. I decided to remove this 
reference for both,
+                                       # GotFocus and LostFocus event of 
control to retain symmetry. 
+                                       self.raiseEvent(dEvents.LostFocus)
 
                # Normal changing selection of buttons will cause buttons to 
lose focus;
                # we need to see if this control has truly lost focus.



_______________________________________________
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