robotlegs / robotlegs-framework

An ActionScript 3 application framework for Flash and Flex
https://robotlegs.tenderapp.com/
MIT License
967 stars 261 forks source link

MediatorMap Extension: Factory + Manager co-dependants #144

Closed Matan closed 11 years ago

Matan commented 11 years ago

Hi,

The MediatorFactory has a constructor argument MediatorManager which defaults to a new instance. The problem is that the manager isn't swappable as the MediatorManager has a constructor requirement of MediatorFactory. Therefore, you can't create a custom Manager as as both the Factory and Manager depend on each other as a constructor argument.

Hope that makes sense! :) Difficult wording that!

Thanks, Matan

darscan commented 11 years ago

Yeh, the design is pretty horrid in that regard.. However, both those classes are private implementation details and should not be modified anyway. They exist purely to divide responsibilities and are not officially supported (see: http://knowledge.robotlegs.org/discussions/robotlegs-2/3677-get-the-mediator-instance-for-a-given-view-instance-or-class).

I'll open a new issue for "Retrieving Mediators for a given View"