Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Referencing multiple proxies from mediator???  (Read 6799 times)
99miles
Jr. Member
**
Posts: 14


View Profile WWW Email
« on: September 21, 2009, 10:53:31 »

This seems kind of bad, but I can't think of a better solution.

I have a Proxy (GetRouteProxy) that gets a route and it's mediator (GetRouteMediator) draws that route on a map.

Then another Proxy (GetBusinessesProxy) gets a bunch of results from a search that contain businesses at certain locations. The Mediator (GetBusinessesMediator) then gets these results and needs to compare the locations against the points in the route. But, this mediator doesn't have the route. So to access it, should I create a reference from within GetBusinessesMediator to GetRouteProxy to get the route? Or...?
Thanks!
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: September 21, 2009, 01:45:41 »

There is no prohibition on Mediators referencing one or more Proxies. Most demos show one of the Mediator's onRegister responsibilities as retrieving references to frequently accessed Proxies.

The classic MVC meta-pattern diagram shows that the View may update the Model directly. Updates do not have to go through the Controller region, though they certainly may.

Here's a brief refresher:
http://puremvc.tv/#P100/T110

-=Cliff>
Logged
Pages: [1]
Print