> As for me I would extend the inteface of this entity.
We cannot, because both EventDispatcher is part of airglobal.swc, and
IEventDispatcher part of playerglobal.swc, which means we don't have
control over their interfaces.


> But why don't we have those?
> removeAllEventListeners()removeEventListener(eventType, Listener = null)
They would be nice, but barring that possibility, I think the most we
could do is to create an extension of EventDispatcher (say,
FlexEventDispatcher) and to use it wherever we now create an instance
of EventDispatcher (right now in 7 places in the SDK) or extend
EventDispatcher (at least 80 places). But I would go for a gradual
implementation (partly because it would increase memory consumption,
having to hold the listeners in a dictionary), in the places which
make most sense (e.g. UI controls which already have multiple
listeners in the SDK for the same event type).
I like the idea, and it wouldn't be that difficult to start, and see
how it goes. Maybe you'd like to create a patch for it?

Reply via email to