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

Show Posts

* | |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / General Discussion / Chaining mediator registration not working? on: October 22, 2012, 11:46:34
I am trying to register a view component with a mediator, then in the onRegister method of the mediator, I'm trying to register another component with another mediator. The first onRegister is called, yet the next is not.


So something like:

:
override public function onRegister(): void
{
   facade.registerMediator( new AppMediator( app ) );
}


=== Then, inside AppMediator ===

:
override public function onRegister(): void
{
   facade.registerMediator( new GameMediator( app.game ) );
}


There is obviously an app helper in the AppMediator. The first onRegister() gets called by the facade but the second onRegister() doesn't get called by the facade.


Any explanation, I thought this was standard practice?


Gary Paluk

P.S. All other objects exist and are tested to be instantiated.
2  PureMVC Manifold / Standard Version / Re: Flex Mobile ViewNavigator and PureMVC on: January 19, 2012, 06:41:48
Hi Cliff,

I'm just trying to solidify the way that you would access the methods in MyMobileApp? The reason I ask is that if you are mediating a view, lets say you default first view; LoginView, we shouldn't directly access the MyMobileApp in order to call these methods so what is the approach here?

Regards
3  PureMVC Manifold / Demos and Utils / Re: Deployment Config - A PureMVC AS3 / Flex / AIR Utility on: May 24, 2011, 10:12:55
When attempting to use this along side the StateMachine I'm not getting a transition into the App.STATE_LOGGED_OUT state. Here's the XML contents of my InjectFSMCommand.

:
<fsm initial={App.STATE_CONFIGURING}>
<state name={App.STATE_CONFIGURING} entering={AppFacade.CONFIGURE}>
<transition action={ConfigProxy.SUCCESS} target={App.STATE_LOGGED_OUT} />
</state>
<state name={App.STATE_LOGGED_OUT} entering={AppFacade.LOGIN}>

</state>
</fsm>



The ConfigureCommand registered in the facade looks like:
:
override public function execute(notification:INotification):void
{
var appConfigProxy: AppConfigProxy = facade.retrieveProxy( ConfigProxy.NAME ) as AppConfigProxy;
appConfigProxy.retrieveConfig();
}



The PrepModelCommand looks like:
:
override public function execute(notification:INotification):void
{
facade.registerProxy( new AppConfigProxy() );
}



My PrepViewCommand is as follows:
:
override public function execute(notification:INotification):void
{
facade.registerMediator( new AppMediator( notification.getBody() as App ) );
}



My StartupCommand is as follows:
:
override protected function initializeMacroCommand():void
{
addSubCommand( PrepModelCommand );
addSubCommand( PrepViewCommand );
addSubCommand( InjectFSMCommand );
}



and LoginCommand is currently just a trace that is not tracing. :|

Anyone who could give me any indication of something wrong within this set up, you will win 1000 internets and my appreciation.


Gary



P.S. Here is the contents of my AppConfigProxy class:
:
public class AppConfigProxy extends ConfigProxy
{
public static const CONFIG_PATH: String = "config/app-config.xml";

public function AppConfigProxy()
{
super( CONFIG_PATH );
}

override protected function constructVO(): IConfigVO
{
return new AppConfigVO( );
}

}
Pages: [1]