[IronPython] Overriding derived methods
Jonathan Jacobs
korpse-ironpython at kaydash.za.net
Fri May 5 17:49:55 CEST 2006
Hi,
I'm wondering how I override methods in a derived object, I'm not sure
whether this is the problem I'm experiencing or not but it looks that way.
Defining my own form object, with OnKeyUp method:
>>> class MyForm(Form):
... def OnKeyUp(self, e):
... print '!!!'
... Form.OnKeyUp(self, e)
...
The problem is that OnKeyUp in my Python object doesn't actually fire
when it should. I know I could do this by attaching an event but
according to the MSDN docs overriding the method in derived classes is
the preferred way to handle the event, it certainly seems cleaner.
Regards
--
Jonathan
More information about the Ironpython-users
mailing list