wxTimer never times out sometimes
Jeffrey Barish
jeff_barish at earthlink.net
Wed Aug 23 19:09:11 PDT 2006
Robin Dunn wrote:
>>
>>self.timer = wx.Timer(self, wx.ID_ANY)
>>
>> where self is the main panel.
>
> It's a long shot, but does using wx.Timer(self, wx.NewId()) make any
> difference?
I will try it. Understand that these experiments take a long time because
the problem is sporadic.
In the meantime, I have some information from the previous test that I said
I would run. I stuck
if self.timer.IsRunning():
print 'Started timer'
else:
print 'Failed to start timer'
at the end of _startTimer, right after the timer is started and the
indicator is set. The timer failed, at which point I did something that
should have retriggered the timer. I got the message "Started timer", so
the timer thinks that it is running right after I set it. I put my program
into a mode in which it ran for a long time so that I could wait to see
whether the timer ever timed out. I had not gotten a timeout message after
an hour.
And another observation: It seems that if the timer is going to fail, it
does so shortly after starting the program. However, I just started it 20
times and did not see it fail once.
I will try the experiment that you suggested now.
--
Jeffrey Barish
More information about the wxpython-users
mailing list