No worries.
Personally, I think in most cases using this approach would not save you
much work (in case it works in the first place).
But I agree that it would be useful that the EventDispatcher class exposed a
method to remove all listeners and probably a method to query any
EventDispatcher obje
On Sun, Jul 20, 2008 at 7:40 PM, Juan Pablo Califano <
[EMAIL PROTECTED]> wrote:
> PD2:
>
> this line should be removed from the unregisterEventListener()
>
> _dispatcher.removeEventListener(type, listener, useCapture);
>
> since it will cause an infinite loop and the eventListener has already bee
PD2:
this line should be removed from the unregisterEventListener()
_dispatcher.removeEventListener(type, listener, useCapture);
since it will cause an infinite loop and the eventListener has already been
removed in the caller anyway.
So, to sum up:
public function unregisterEventListener(ty
PD:
I forgot to actually remove the eventListenerData from the list in the
unregisterEventListener method of the Bookkeeper class. Looping backwards
and adding _eventsList.splice(i, 1); should do it.
Cheers
Juan Pablo Califano
2008/7/20, Juan Pablo Califano <[EMAIL PROTECTED]>:
>
> Hi,
>
> Yo
Hi,
You could try to do your own bookkeeping, so you know what listeners are
registered to an EventDispatcher object. You can have one class to hold that
info in a list and write a method that loops through that list and remove
all registered listeners. You'd still have to override the addEventLis
Hi list,
I'm wondering if I can have a generical function, that I can remove all
listeners registered for an object. Imagine a button with 10 listeners, and
I don`t need know which ones it are to remove. I simply call
"removeListeners(dpo)" and that function does all work.
Is there any way?
Than
6 matches
Mail list logo