Hi, I am an IPy newbie, trying to run example 7.17 from IronPython in Action. It includes the code
delegate = CallTarget0(something.form.Close) something.form.Invoke(delegate) were something.form is a Windows.Forms.Form object. The first line above gives this error: Traceback (most recent call last): File "C:\Project\MangoTest\src\SmokeTest.py", line 43, in C:\Project\MangoTest\src\SmokeTest.py File "mscorlib", line unknown, in CreateDelegate ValueError: Error binding to target method. If I change the first line to delegate = CallTarget0(lambda: something.form.Close()) it works fine. Does the argument to CallTarget0() have to be a Python function? Or, what is going on here? I'm running IronPython 2.0.1 on Win XP with .NET 3.5. Thanks, Kent _______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com