PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: Gilbi on April 27, 2008, 10:11:55



Title: Stupid Question about sendNotification
Post by: Gilbi on April 27, 2008, 10:11:55
I'm sending this notification from my Proxy:

sendNotification("$about", ["hello","there"], "Array" );

The Mediator receives the Notification:

override public function handleNotification(notification:INotification):void{
   super.handleNotification(notification);
         
   var arr:Array = notification.getBody() as Array;
   trace("arr:" + arr);
}

Here is the output:
arr:,hello,there

An array element was added to the beginning of the Array!
What am I doing wrong?



Title: Re: Stupid Question about sendNotification
Post by: puremvc on April 28, 2008, 11:02:42
What do you get if you add:

:
trace("arr:" + ["hello","there"]);
just before your sendNotification call?

-=Cliff>


Title: Re: Stupid Question about sendNotification
Post by: Gilbi on April 28, 2008, 11:23:28
Thanks for the response. I think I just figured it out. Even though I tried to simplify the problem by passing in an explicit array, the real issue was that one of the other Mediators handling the Notification was modifying the array. Sorry for the stupid question.  :-[