import mx.remoting.Service;
import mx.rpc.RelayResponder;
import mx.remoting.PendingCall;
import mx.rpc.ResultEvent;
import mx.rpc.FaultEvent;
import mx.services.Log;
function getString_Result(evt:ResultEvent):Void {
responseAreaText.text = evt.result;
}
function getString_Fault(evt:FaultEvent):Void {
trace("Error: "+evt.fault.__faultstring);
responseAreaText.text = fault.fault.faultstring;
}
requestButton.clickHandler = function() {
var service:Service = new Service(gatewayPath.text, new Log(),
"hello", null,null);
var mypc:PendingCall = service.getString();
mypc.responder = new RelayResponder(this, "getString_Result",
"getString_Fault");
}
The function getString_Result and getString_Fault never be invoked. Why?
ufitzi - 29 Jun 2005 18:38 GMT
do a trace(this) inside of clickHandler().
It may be referencing the wrong object.
If requestButton is actually a MovieCLip, "this" is referencing the MC and the
functions _Result and _Fault will not be found.
good luck
bh