Edward d'Auvergne wrote:
> I've noticed a recent problem in wxPython, though maybe this lies on
> the wxGTK side. wx.Yield() no longer appears to flush all events.
> ...
> I would expect that the print call would print out 100, as it does in
> the 2.8 versions and earlier 2.9 versions, but instead I see 0! Any
> ideas as to what this problem is or where a better place to ask is?
I think it was a fluke that it ever worked. It's a timing issue. You
are calling this in Main.__init__, which has to run to completion before
the event loop ever gets launched (in the call to app.MainLoop). So,
although the call to wx.CallAfter has, indeed, queued up an event,
there's no one looking at the event loop to drain those events, so
there's nothing for Yield to do.
It's possible this changed because of some internal implementation
detail, but I think you were relying on undefined behavior to begin
with. wx.Yield is meaningless unless an event loop is running.
--
Tim Roberts,
ti...@probo.com
Providenza & Boekelheide, Inc.