Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Stupid Question about sendNotification  (Read 6694 times)
Gilbi
Full Member
***
Posts: 22


View Profile Email
« 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?

Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: April 28, 2008, 11:02:42 »

What do you get if you add:

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

-=Cliff>
Logged
Gilbi
Full Member
***
Posts: 22


View Profile Email
« Reply #2 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.  :-[
Logged
Pages: [1]
Print