[IronPython] Problem binding delegate to Form.Paint

Brian Quinlan brian at sweetapp.com
Wed Sep 1 13:20:23 CEST 2004


def paint(data, event):
     pass

f.Paint += paint

Unhandled Exception: System.ArgumentException: Error binding to target
method.
    at System.Delegate.InternalCreate(Object target, String method,
Boolean ignor
eCase)
    at System.Delegate.CreateDelegate(Type type, Object target, String
method)
    at IronPython.Objects.ReflectedEvent.__iadd__(Object func)
    at IronPython.Objects.Ops.InPlaceAdd(Object x, Object y)
    at __main__.init() in C:\Dev\gui_winforms.py:line 37
    at IronPythonConsole.IronPython.DoFile(String[] args)
    at IronPythonConsole.IronPython.Main(String[] args)

Does anyone understand this problem?

Cheers,
Brian




More information about the Ironpython-users mailing list