I’m attaching two scripts which attempt to call wx.CallAfter. One invokes wx.CallAfter inside an extension of the wx.Frame class and another invokes wx.CallAfter inside an extension of the wx.App class.
Any idea why the invocation inside the wx.App class does not work while the invocation inside the wx.Frame class does?
wx.CallAfter_ex1.py (395 Bytes)
wx.CallAfter_ex2.py (524 Bytes)
RedHotChiliPepper wrote:
I’m attaching two scripts which attempt to call wx.CallAfter. One invokes wx.CallAfter inside
an extension of the wx.Frame class and another invokes wx.CallAfter inside an extension of the
wx.App class.
Any idea why the invocation inside the wx.App class does not work while the invocation inside the
wx.Frame class does?
Yes. You are calling it in the wx.App constructor, which runs before you have even created a message loop. At that point, there are no windows, so there IS no message queue, so there’s no place for the system to
put the CallAfter request.
···
–
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Solid explanation, thank you
···
On Sunday, November 3, 2013 11:15:48 PM UTC-5, Tim Roberts wrote:
RedHotChiliPepper wrote:
I’m attaching two scripts which attempt to call wx.CallAfter. One invokes wx.CallAfter inside
an extension of the wx.Frame class and another invokes wx.CallAfter inside an extension of the
wx.App class.
Any idea why the invocation inside the wx.App class does not work while the invocation inside the
wx.Frame class does?
Yes. You are calling it in the wx.App constructor, which runs before you have even created a message loop. At that point, there are no windows, so there IS no message queue, so there’s no place for the system to
put the CallAfter request.
–
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.