#253 wx.Timer incorrect binding

open
nobody
5
2013-05-31
2005-07-15
Konrads Smelkovs
No

by default, boa generates code like:
self.ReloadTimer = wx.Timer(id=wxID_MAINFRAMETIMER1,
owner=self)
self.ReloadTimer.Bind(wx.EVT_TIMER, self.OnReloadTimer,
id=wxID_MAINFRAMETIMER1)
This code will never call OnReloadTimer.

It should be self.Bind(wx.EVT_TIMER,
self.OnReloadTimer, id=wxID_MAINFRAMETIMER1)

Discussion

  • francy
    francy
    2013-05-31

    hello,after i create a timer,then i bind it,but where to set time start? how to set timer.Start()? can you help me?

    Looking forward to your reply~3Q