Write on the top of command:
[Event(name="enableChange", type="com.adobe.cairngorm.control.CairngormEvent")]
Result Method of Command:
public function result(data:Object):void
{
var e:CairngormEvent=new CairngormEvent("enableChange");
CairngormEventDispatcher.getInstance().dispatchEvent(e);
}
Listen for that in a view :
height="100%"
creationComplete="creationComplete()"
layout="absolute" backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#FFFFFF, #FFFFFF]"
xmlns:components="components.*"
xmlns:business="business.*"
xmlns:view="view.*"
xmlns:control="control.*">
import com.adobe.cairngorm.control.CairngormEventDispatcher;
import mx.controls.Alert;
import com.adobe.cairngorm.control.CairngormEvent;
import flash.events.Event;
private function creationComplete ():void {
CairngormEventDispatcher.getInstance().addEventListener("enableChange", enableChangedListener);
}
public function enableChangedListener(eventOb:CairngormEvent):void {
Alert.show("Handle Event", "Catch");
// Handle event.
}