I'm building a simple app that populates a combo box with a list of drinks and then stores the order in a proxy.
My problem is that when my DrinksListProxy sends a notification (to populate the combo box where you select a drink) it is received by my DrinkComboMediator but the notification is blank (flex traces org.puremvc.as3.patterns.observer.Notification (@222254e9)). I've put breakpoints in my code to check the notification is generated correctly and the body and name seem to be set but when my handleNotification method is reached, I get the blank notification. Here's my code from DrinkComboMediator:
override public function listNotificationInterests():Array
var retA:Array = [
override public function handleNotification(notification:INotification):void
//blank notification received here!
var drinksListProxy:DrinksListProxy = facade.retrieveProxy(DrinksListProxy.NAME) as DrinksListProxy;
switch ( notification.getName() )
//set data provider TODO target the drinks combo correctly
viewComponent.drinksCombo.dataProvider = notification.getBody() as ArrayCollection;
default : break;
You can download the source from here:
My second problem (which is more flex related than puremvc) is that I can't target my drinksCombo mxml component from my DrinksMediator class. This is the view component that contains the combo box. Again I think I've made a pretty basic error here but if someone could point it out I'd be really grateful.
If anyone could assist it would be a massive help as I'm really enjoying working with puremvc but I've hit an obstacle I can't seem to get over.
Thanks in advance,