Ahh I see what you mean now. If you're doing this from the hosting APIs you can use the ObjectOperations class to do the conversion:
someObj.someEvent += objOps.ConvertTo<DelegateType>(obj); A Python specific solution would be doing: someObj.SomeEvent += (DelegateType)Converter.ConvertToDelegate(obj, typeof(DelegateType)); -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Eloff Sent: Sunday, July 13, 2008 5:09 PM To: Discussion of IronPython Subject: Re: [IronPython] Add/remove python function to C# event in C# On Sun, Jul 13, 2008 at 6:50 PM, Dino Viehland <[EMAIL PROTECTED]> wrote: > objOrType.someEvent += somePythonFunctionOrCallableObject > > And > > objOrType.someEvent -= somePythonFunctionOrCallableObject > > Should just work. It does just work, in Python. What do I do in C#? Thanks, -Dan _______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
