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
BedrockMission!

Learn More

View all

Sign in to view all badges

data coming late by remote object

Avatar

Avatar
Level 1
RUSH-ME
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
RUSH-ME
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
RUSH-ME
Level 1

04-11-2008

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.