home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 136
/
MOBICLIC136.ISO
/
pc
/
DATA
/
HOTE
/
libs
/
amfphp
/
amfphp.swf
/
scripts
/
__Packages
/
mx
/
remoting
/
NetServiceProxyResponder.as
< prev
next >
Wrap
Text File
|
2011-07-20
|
2KB
|
58 lines
class mx.remoting.NetServiceProxyResponder extends Object
{
function NetServiceProxyResponder(serv, method)
{
super();
this.service = serv;
this.methodName = method;
}
function onResult(result)
{
var _loc2_ = result;
var _loc1_ = this.service.client;
if(_loc2_ instanceof mx.remoting.NetServiceProxy || _loc2_ instanceof mx.remoting.RecordSet)
{
_loc2_._setParentService(this.service);
}
var _loc3_ = this.methodName + "_Result";
if(typeof _loc1_[_loc3_] == "function")
{
_loc1_[_loc3_].apply(_loc1_,[_loc2_]);
}
else if(typeof _loc1_.onResult == "function")
{
_loc1_.onResult(_loc2_);
}
else
{
mx.remoting.NetServices.trace("NetServices","info",1,_loc3_ + " was received from server: " + _loc2_);
}
}
function onStatus(result)
{
var _loc2_ = result;
var _loc1_ = this.service.client;
var _loc3_ = this.methodName + "_Status";
if(typeof _loc1_[_loc3_] == "function")
{
_loc1_[_loc3_].apply(_loc1_,[_loc2_]);
}
else if(typeof _loc1_.onStatus == "function")
{
_loc1_.onStatus(_loc2_);
}
else if(typeof _root.onStatus == "function")
{
_root.onStatus(_loc2_);
}
else if(typeof _global.System.onStatus == "function")
{
_global.System.onStatus(_loc2_);
}
else
{
mx.remoting.NetServices.trace("NetServices","info",2,_loc3_ + " was received from server: <" + _loc2_.level + "> " + _loc2_.description);
}
}
}