in my application.mxml I have a creationcomplete function initMe()
which is suppose to create an event and send it to Cairngorm but it's
not returning data, no errors though either, I don't know where to
check for data to see if it's making it to a certain point..
The initMe looks like...
import com.control.MyControl;
public function initMe():void {
var evt:CairngormEvent = new CairngormEvent( MyControl.EVENT_LOAD_DATA
);
Alert.show(evt as String); // returns a null Alert
CairngormEventDispatcher.getInstance().dispatchEvent(evt);
}
in MyControl.as I have
public function MyControl()
{
addCommand(MyControl.EVENT_LOAD_DATA,LoadDataCommand );
... other events
}
//cairngorm event names
public static const EVENT_LOAD_DATA:String = 'loadData';
... others
}
the loadcommand.as looks like
....
public function execute(event:CairngormEvent):void {
Alert.show('here');
var del:MyDelegate = new MyDelegate(this);
del.loadData();
}
But the Alerts aren't firing... The one in initMe() is but it's empty..
Perhaps I'm not following the flow correctly?
Could someone assist me in where to look and how (Alerts?) for data
hitting an .as file or the back end?