PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: bestbuyernc on October 06, 2009, 06:30:29



Title: Passing Around Data
Post by: bestbuyernc 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;