sinosoidal
|
 |
« on: October 15, 2008, 02:30:44 » |
|
Hi,
Before I started doing anything in puremvc i read half of the documentation and try to put the example on the documentation working. I was a little bit disapointed with the example because it was not a complete sample.
In the example, the login command is declaraded on the application facade and then, onTryLogin a notification is sent for that.
However, in the diagram, its possible to comunicate directly between mediators and proxies and thats what i'm trying to do, but its not working.
This is what i'm doing in my mediator:
override public function listNotificationInterests():Array { return [AccessProxy.LOGIN, AccessProxy.LOGIN_FAILED, AccessProxy.LOGIN_SUCCESS]; } override public function handleNotification(notification:INotification):void { switch(notification.getName()) { case AccessProxy.LOGIN: var loginProxy:AccessProxy = facade.retrieveProxy(AccessProxy.NAME) as AccessProxy; loginProxy.login(accessPanel.loginVO); mx.controls.Alert.show("notification sent"); break; } } private function onTryLogin(event:Event): void { sendNotification(AccessProxy.LOGIN,accessPanel.loginVO); }
Can anyone clarify me this?
Thanks,
Nuno
|