p35 of the best practices document
http://puremvc.org/component/option,com_wrapper/Itemid,30/If I try duplicating the example, using the following in my LoginPanelMediator, loginPanel traces null. Also, shouldn't viewComponent in the implicit getter reference the Main class , passed in thru the body of the StartUpCommand?
//CODE START
// User clicked Login Button; try to log in
private function onTryLogin ( event:Event ) : void {
trace('loginPanel==='+loginPanel);//traces null
sendNotification( ApplicationFacade.LOGIN, loginPanel.loginVO );
}
// Cast the viewComponent to its actual type.
protected function get loginPanel() : LoginPanel {
return viewComponent as LoginPanel;
}
//CODE END