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: ViewStack and registering mediator  (Read 7629 times)
flex.net
Newbie
*
Posts: 4


View Profile Email
« on: January 27, 2009, 05:05:57 »

Hi,

I've followed the Slacker-demo and I've done my application so that I've Main.mxml where's MainDisplay-view and inside MainDisplay there's ViewStack where's Startup-view and Summary-view. For Summary-view I've a button to show the view. But Startup-view shows first. Now everything works ok, expect it seems that Startup-view's mediator doesn't get registered. I've put
:
sendNotification( ApplicationFacade.STARTUP_MODE ); in StartupCommand.as and MainDisplayMediator seems to trigger that 'cos it's showing Startup-view. But Startup-view never dispatch event in creationComplete. Summary-view works ok when I click my button which also sends notifications to MainDisplayMediator. Any help? And please ask more code to see if needed.
Logged
flex.net
Newbie
*
Posts: 4


View Profile Email
« Reply #1 on: January 27, 2009, 07:41:17 »

Now I think that I found answer why my StartupViewMediator is not registered from this post: http://forums.puremvc.org/index.php?topic=879.0.

So now I fixed my problem so that in MainDisplayMediator's onRegister-function I use facade.registerMediator to register my StartupViewMediator. But if I understood right from the linked post, it's not prefferred way?
« Last Edit: January 27, 2009, 07:51:17 by flex.net » Logged
Pages: [1]
Print