Groups | Blog | Home
all groups > macromedia flash flash remoting > february 2006 >

macromedia flash flash remoting : RelayResponder - resultFunc & faultFunc


NeedFlashGurus
2/13/2006 10:16:17 PM
Hi

Can the resultFunction and faultFunction from the RelayResponder class return
any value? or ar they just void?


example:
(...)
pc.responder = new RelayResponder(this, 'userLoginResult', 'userLoginError');
(...)

//how can I catch the return?
function userLoginResult(res:ResultEvent):Boolean{
return Boolean(res.result);

thanks
}
JanM
2/15/2006 11:36:44 PM
Yes for the case there is a result you can catch it, but the function is void:
pc.responder = new RelayResponder(this, "onLoginData", "onLoginFault");
function onLoginData(re:ResultEvent):Void {
if(re.result != 0){
cat_id = re.result;
}
}

I also use a Fault function but if the server does not return anything, it
will not be invoked.
I never get something in this function:
function onLoginFault(fault:FaultEvent):Void {
mx.remoting.debug.NetDebug.trace({level:"None",
message:"There was a problem: " + fault.fault.faultstring });
}
AddThis Social Bookmark Button