dabo Commit
Revision 6083
Date: 2010-10-06 17:01:12 -0700 (Wed, 06 Oct 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6083
Changed:
U trunk/dabo/ui/uiwx/__init__.py
Log:
Occasionally, my app would hang during report status updates, inside the
Pending()
call but before the Dispatch() line. IOW, somewhere down in wxPython or
wxWidgets.
So I'm going to try the SafeYield() approach for now which so far seems to work,
but only time will tell if one of my users gets the 'wxYield called recursively'
error.
Diff:
Modified: trunk/dabo/ui/uiwx/__init__.py
===================================================================
--- trunk/dabo/ui/uiwx/__init__.py 2010-10-06 19:41:03 UTC (rev 6082)
+++ trunk/dabo/ui/uiwx/__init__.py 2010-10-07 00:01:12 UTC (rev 6083)
@@ -327,9 +327,7 @@
def yieldUI(_safe=False, *args, **kwargs):
"""Yield to other apps/messages."""
if _safe:
- while wx.GetApp().Pending():
- wx.GetApp().Dispatch()
- wx.GetApp().Yield(True)
+ wx.YieldIfNeeded(*args, **kwargs)
else:
wx.Yield(*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]