Hi, I am facing problem with data coming late by remote
object. the sample code is-
[Bindable]
public var isRelationExist:Boolean = false;
private var remoteLoginObject : RemoteObject = new
RemoteObject();
//some code
public function setCurrentNode(value:Node):void
{
remoteLoginObject.destination = "NodeRef";
remoteLoginObject.isDirectRelation(value.name,
getCurrentFromNode().name);
remoteLoginObject.showBusyCursor = true;
remoteLoginObject.addEventListener(ResultEvent.RESULT,
setNodeRelation);
remoteLoginObject.addEventListener(FaultEvent.FAULT,
showAlert);
this.currentToNode = value;
}
private function showAlert(event:FaultEvent):void
{
Alert.show(event.fault.toString());
}
private function setNodeRelation(event:ResultEvent):void
{
isRelationExist = event.result as Boolean;
}
//some code
//below function has called later
public function getRelation():void
{
if(isRelationExist)
DrawLine.isDotted = false;
else
DrawLine.isDotted = true;
}
Here I am getting the previous value of the
'isrRelationExist'
please suggest any idea to solve this problem.
thanks in advance.