Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Welcome, Guest. Please login or register.
July 28, 2017, 11:51:39 AM
Home Help Search Login Register
News: Please DM @puremvc on Twitter to gain forum access. Spambots are why we can't have nice things.
Pages: [1]
Print
Author Topic: feature request  (Read 4866 times)
saad
Sr. Member
****
Posts: 65


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

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: 2870



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

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


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

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: 2870



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

Makes sense.
Logged
Pages: [1]
Print
Jump to: