wxTimer never times out sometimes

Jeffrey Barish jeff_barish at earthlink.net
Thu Aug 24 18:03:49 PDT 2006


Robin Dunn wrote:

> It's a long shot, but does using wx.Timer(self, wx.NewId()) make any
> difference?

Well, yes.  It seems to be failing more reliably.  There is even a traceback
now.  Although it fails in a different way, I may be obtaining useful
information.  There are two timers in my program.  The second timer
performs a completely different purpose.  Is it possible that they are
stepping on each other's feet?  Are there restrictions on how they need to
be instantiated so avoid conflicts?  In particular, I note that the same
panel owns both timers.

More information: I put the wx.NewId() only in the first timer before making
the previous observations.  After putting wx.NewId() in the second timer as
well, the program no longer fails reliably nor do I get a traceback.  My
previous observations may be bogus, but still I wonder whether the presence
of a second timer could be the cause of the problem.

I am running the program now with wx.NewId() in both timers.  If that change
is going to make an improvement, it obviously needs to be implemented in
both timers.  The true test of that change begins now.
-- 
Jeffrey Barish





More information about the wxpython-users mailing list