puremvc
|
|
« Reply #1 on: May 30, 2012, 07:41:21 » |
|
Sure. If one proxy is dependent upon another proxy, just define the first proxy to take the second one as a required constructor argument. In the constructor of that first proxy, store the reference to the second one in a protected property.
You could have the first one retrieve the second one via the Facade, but there is always the possibility that will fail, if the other proxy is not yet registered. By passing the reference to the second proxy on the constructor, you ensure that it will be present as soon as it is needed, and forces you to create and register them in the right order.
|