Hello,
I'm tryin' to do this demo with Flex... :
OutputComponent.mxml :
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical" width="400" height="300"
title="PureMVC AsyncCommand" creationPolicy="all">
<mx:Script>
<![CDATA[
private var logCount:int = 1;
public function log( msg:String ):void
{
if ( ta_output == null ) return;
else ta_output.text += String( logCount )+ ". " + msg + "\n";
//output.text = String( logCount )+ ". " + msg + "\n";
logCount++;
}
]]>
</mx:Script>
<mx:TextArea id="ta_output" width="100%" height="100%"/>
</mx:Panel>
and my OutputMediator.as :
package org.view
{
import org.ApplicationFacade;
import org.puremvc.as3.interfaces.INotification;
import org.puremvc.as3.patterns.mediator.Mediator;
import org.view.comp.OutputComponent;
public class OutputMediator extends Mediator
{
public static const NAME:String = "OutputMediator";
public function OutputMediator( viewComponent:OutputComponent )
{
trace("viewComponent: "+viewComponent.ta_output);
super( NAME, viewComponent );
}
// Called by the View when the Mediator is registered
override public function onRegister():void
{
sendNotification( ApplicationFacade.BEGIN_ASYNC_COMMANDS );
}
// List the INotification names this Mediator is interested in being notified of.
override public function listNotificationInterests():Array
{
return [ ApplicationFacade.LOG_OUTPUT ];
}
// Handle INotifications.
override public function handleNotification( notification:INotification ):void
{
switch ( notification.getName() )
{
case ApplicationFacade.LOG_OUTPUT:
var logMessage:String = notification.getBody() as String;
trace("logMessage: "+ logMessage);
output.log( logMessage );
break;
}
}
public function get output():OutputComponent
{
return viewComponent as OutputComponent;
}
}
}
the thing is that my output textarea (ta_output) is null at the moment of the first async command...

I don't understand why and can't figure out the reason...
this is not the first time I try to port a demo for flash to flex and I always have this same problem of null object...
so this time I tried the simplest demo I found, but still have this annoying thing :-(
Would you please have any idea about this issue ?
Thx for help.