RE: [wxPython] Deletion of wxTimer objects
As soon as I change the id to something non-default
I don’t get the callback invoked anymore.
By the way, I am doing the creation of the timer in
a global function, but passing in the main frame as the
event source, and using a global function as the event
handler. Is this ok?
···
-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Friday, March 22, 2002 10:16 AM
To: wxpython-users@lists.wxwindows.org
Subject: Re: [wxPython] Deletion of wxTimer objects
I’ve tried that approach, but unfortunately I need two
timers running and haven’t figured out how to make both
run at the same time (but with different intervals). I
can only actually get the event handler called if both
timers have an id of -1, and I think when they have the
same id they interfere with each other.
Use different, non-default, IDs.
timer1 = wxTimer(self, ID1)
timer2 = wxTimer(self, ID2)
EVT_TIMER(self, ID1, self.OnTimer1)
EVT_TIMER(self, ID2, self.OnTimer2)
–
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!
wxpython-users mailing list