On 1/26/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote:
>
>
> I think a better scheme *in these cases* would be something like this
> when adding observers:
> Event.addObserver(key, element, name, observer, useCapture);
> and then, the dispose function would simply call something like
> Event.stopObservers(key);


I must admit I'm not sure what this is all about. There's already a patch in
Trac that rewrites Event module in a way that allows removing *all*
observers from an element in a single call (you can also restrict it only to
certain event type). That already simplifies event handling a great deal.

What are the semantics of the "key" you are talking about?

UPDATE: Hm, the text you've written in the ticket description is better
formed than this, and I figured out what you were saying.

First of all, I disapprove of marking #6509 as fixed because it isn't, the
patch is just superseded by another. You should have marked it as duplicate.

Second, I don't like breaking backwards compatibility with this additional
first argument. The method calls are starting to look too complicated. With
the Event rewrite by Andrew and me you only need to know what elements you
added observers to and you can clean up like this:

    elements.invoke(Event.stopObserving)

While your "key" idea is not bad, I don't think we should go to those
lengths just for better event handling.

-m

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to