Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

data coming late by remote object

RUSH-ME
Level 1
Level 1
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.
0 Replies