Hello NG,
I am subclassing wx.EvtHandler to handle some events, and surely I
am doing something wrong. This is what I do:
class MyEvtHandler(wx.EvtHandler):
def __init__(self, myInput):
self._myInput = myInput
wx.EvtHandler.__init__(self)
self.Bind(wx.EVT_SCROLL, self.ProcessEvent)
self.Bind(wx.EVT_PAINT, self.ProcessEvent)
self.Bind(wx.EVT_SIZE, self.ProcessEvent)
self.Bind(wx.EVT_MOUSEWHEEL, self.ProcessEvent)
self.Bind(wx.EVT_CHAR, self.ProcessEvent)
self.Bind(wx.EVT_ENTER_WINDOW, self.ProcessEvent)
self.Bind(wx.EVT_LEAVE_WINDOW, self.ProcessEvent)
def ProcessEvent(self, event):
evType = event.GetEventType()
# pass it on to the real handler
processed = wx.EvtHandler.ProcessEvent(self, event)
This last line is there because I would like to know if some other
class has overridden that particular event (returning processed =
True) or not.
Well, as soon as this last line is executed, I get a bunch of:
"RuntimeError: maximum recursion depth exceeded"
Uhm... Does anyone know what I may be doing wrong?
Thank you for every pointer...
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/