[IronPython] Event unhooking and IPy2
glenn.k.jones+ipy at gmail.com
Fri Nov 28 03:36:13 PST 2008
In Resolver One on IronPython 1, we have code to unhook events that uses an
object that is equal to everything like this:
e = EqualToAll()
for _ in range(100):
event -= e
What we have discovered when we run under IPy2, is that the __eq__ method on
EqualToAll is only called when the target of the event is a lambda, a
function or a callable object but not when it's a method.
Is there a better way to unhook all events or get a list of currently
subscribed targets? For the moment, we're going to wrap our event targets in
lambdas as a way to move forward, but the whole EqualToAll and arbitrary
looping seems a little dirty anyway.
Glenn & Will
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users