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: Passing Around Data  (Read 2750 times)
bestbuyernc
Full Member
***
Posts: 21


View Profile Email
« on: October 06, 2009, 06:30:29 »

Hi.  Is this an ok way to pass around data?

:
         
        //IN APPLICATION MEDIATOR
        // user was returned from the login proxy
        case LoginProxy.LOGIN_COMPLETE:
        // create a user instance from the body
        var user:UserVO = body as UserVO;
        // set the global application user
        appProxy.appUser = user;
        // the main screen view component has a label welcoming the user so I need to get the main screen mediator
        var mainScreenMediator:MainScreenMediator = facade.retrieveMediator( MainScreenMediator.NAME ) as MainScreenMediator;
        // main screen exposes a public variable called 'appUser' that is set by its mediator
        mainScreenMediator.setUser( user );
        // change the view to the main screen
        changeView( ApplicationFacade.MAIN_SCREEN );
        break;
« Last Edit: October 06, 2009, 06:35:51 by bestbuyernc » Logged
Pages: [1]
Print