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: feature request  (Read 10280 times)
saad
Sr. Member
****
Posts: 65


View Profile Email
« on: September 27, 2013, 11:12:11 »

Hi Cliff:

Possible that if you can implement a change across all the ports in your next release, that the registerProxy function returns the proxy after calling onRegister function. Same with registerMediator, that it should return the registered mediator.

I run into a case where I had to register sub-proxies and sub-mediators inside proxies and mediators (onRegister function) and had to write additional lines to retrieve them.

I added return at the end for Facade, Model and View for registerProxy and registerMediator functions for this PHP port and wish that if it becomes part of all other ports. Any thoughts?

Regards.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: October 14, 2013, 10:24:36 »

You already have the Proxy in hand, before and after you make the register call.
Logged
saad
Sr. Member
****
Posts: 65


View Profile Email
« Reply #2 on: December 06, 2013, 10:16:50 »

you're right, but following approach is helpful (from visibility point of view) and reduces lines of code when I've several proxy or mediator instantiations going on in one place.

this.testProxy = this.facade.registerProxy(new TestProxy());
instead of another short form (this.facade.registerProxy(this.testProxy = new TestProxy());
... plus several more proxies or mediator instantiations.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #3 on: December 07, 2013, 11:34:32 »

Makes sense.
Logged
Pages: [1]
Print