Add event listeners on the call since he's a WebService for "fault" and "result".
 
call.addEventListener(mx.rpc.events.FaultEvent.FAULT, onFault);
call.addEventListener(mx.rpc.events.ResultEvent.RESULT, onFault);
 
----- Original Message -----
Sent: Tuesday, July 04, 2006 6:15 AM
Subject: [flexcoders] Handle result/fault from webservice call in Cairngorm 2

I setup an new Project in Flex 2 using Cairngorm 2 and now I'm trying to handle result/fault coming from a webservice. I created a subclass of ServiceLocator for the webservice. When I debug the call it works and I get data:
 
var call:AsyncToken = ServiceLocator.getInstance().getService("webservice").getData();
 
But now I dont know how I can handle this result/fault. In Flex 1.5 we have do it this way:
 
var call:Object= ServiceLocator.getInstance().getService("webservice").getData();
call.resultHandler = resultHandler(event);
call.faultHandler = faultHandler(event);
 
But now it dont work and I have no idea how to do it. I also looking on Adobe Labs but there ist still docs for Cairngorm 0.99. So, can any one help me to solve this problem?
 
Thanks, Artur
__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to