puremvc
|
|
« Reply #1 on: October 24, 2011, 10:25:35 » |
|
I assume you mean your Proxies.
If these are fixed values you could put them in a constants file, of course.
If not, then you should make a Proxy for holding those values, and pass a reference to that Proxy into the constructors of the other Proxies when they are created. Have those Proxies keep the reference, and they'll all be able to collaborate with the common Proxy. And Commands and Mediators will also be able retrieve that Proxy if they need access to it.
/** * Constructor. * * The SandwichProxy collaborates with the * JamProxy and the BreadProxy to ensure * consistency of the domain data. Requiring * them on the constructor ensures they * will be present. */ public function SandwichProxy( jamProxy:JamProxy, breadProxy:BreadProxy ) { super( NAME ); this.jamProxy = jamProxy; this.breadProxy = breadProxy; }
-=Cliff>
|