我如何处理Actionscript类中的异步令牌
|
这是我的代码:
public class Schem
{
public var info:String=\"\";
private var ro:RemoteObject = new RemoteObject(\"Hibernatetest\");
public function Schem()
{
ro.endpoint = \"http://jesus/blazeds/messagebroker/amf\";
}
public function loadCurrentSchem():void
{
var token:AsyncToken = ro.getCells();
token.addResponder(new AsyncResponder(onResult,onFault));
info = info + \"Loader Called ...\";
}
private function onResult(event:ResultEvent,token:Object):void {
var cellList:ArrayCollection = event.result as ArrayCollection;
info = info + \"Resulthandler Called\";
}
private function onFault(event:FaultEvent,token:Object):void
{
}
//Eventhandlers
//Getters, Setters
}
通过检查信息字符串,我发现,当我调用loadCurrentSchem()时,该类未达到Resulthanlder。这是为什么?
没有找到相关结果
已邀请:
1 个回复
爆刺疤灯