[IronPython] Two problems

Curt Hagenlocher curt at hagenlocher.org
Mon Aug 23 22:22:41 CEST 2004


I previously wrote:

> "Jim Hugunin" <jim at ironpython.com> writes:
> 
>> The big bug in IronPython-0.6 is that even this won't work as the
>> created delegate won't have the right signature.  You can see
>> Ops.GetDelegate if you're interested in the really weak code
>> that's breaking for you.
> 
> The immediate need could probably be fixed by adding the following
> function to PythonEventHandler:
> [snip]

I've created a more sophisticated delegate wrapper now.  You can
download the additional code from
http://www.pureevil.org/software/DelegateMaker.cs.txt

You would then need to change ReflectedEvent.__iadd__ to
read
handler = DelegateMaker.Make(info.EventHandlerType, func);
and Ops.GetDelegate to read
return DelegateMaker.Make(delegateType, o);

--
Curt Hagenlocher
curt at hagenlocher.org



More information about the Ironpython-users mailing list