On Aug 9, 2007, at 5:56 PM, Severin Heiniger wrote: > Is there any reason not to remove the event handler(s) from the > private event cache when calling Event.stopObserving? The cache may > get messed up with dead handlers by and by especially when running > as a single page app. And - less important - a handler can't be re- > registered, not even after properly calling stopObserving before.
It was an oversight. The code to clean up the wrapped event handlers was (mostly) already written, it just wasn't being called from Event.stopObserving. I've fixed this in [7299]. > And secondly, why did you choose not to use an array as the type of > the private event cache? The event indices are plain integers. I suppose it could be implemented with an array instead of an object, but I think the latter better fits my mental model of the cache as a mapping of element references <-> sets of handlers. (BTW, I'm really glad people are already trying out the new event code. We hope to have the first feature-complete release candidate of 1.6.0 out the door in the next few days, once we resolve some failing tests in IE and Safari 2.) -sam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---
