RE: [flexcoders] Handle result/fault from webservice call in Cairngorm 2

2006-07-05 Thread Artur Kordowski





@Tom
Why not use a delegate ?
The delegate class is not longer available in the flex framework, so I 
can't use it.

@Jester
I've got still an error. Here my code how I've build 
it.

Service.mxml - subclass from ServiceLocator
?xml version="1.0" 
encoding="utf-8"?cairngorm:ServiceLocatorxmlns:mx="http://www.adobe.com/2006/mxml"xmlns:cairngorm="com.adobe.cairngorm.business.*"mx:WebServiceid 
= "webservice"wsdl = "http://123.456.78.90/webservice/webservice.asmx?wsdl"result 
= "event.token.resultHandler(event)"fault = 
"event.token.faultHandler(event)"//cairngorm:ServiceLocator

index.mxml 
- Main App
private 
function init():void{var call:AsyncToken = 
ServiceLocator.getInstance().getService("webservice").getData();call.addEventListener(mx.rpc.events.ResultEvent.RESULT, 
resultHandler);}

When I use 
it this way I've got still an error from the debug player: "resultHandler is no 
function".

Any other 
ideas?

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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] Handle result/fault from webservice call in Cairngorm 2

2006-07-05 Thread Tom Chiverton
On Wednesday 05 July 2006 07:20, Artur Kordowski wrote:
 Why not use a delegate ?
 The delegate class is not longer available in the flex framework, so I
 can't use it.

It was never in the flex framework, it's a Cairngorm convention.

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



 Yahoo! Groups Sponsor ~-- 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [flexcoders] Handle result/fault from webservice call in Cairngorm 2

2006-07-05 Thread Artur Kordowski





@Tom
Why not use a delegate ?
The delegate class is not longer available in the flex framework, so I 
can't use it.

@Jester
I've got still an error. Here my code how I've build 
it.

Service.mxml - subclass from ServiceLocator
?xml version="1.0" 
encoding="utf-8"?cairngorm:ServiceLocatorxmlns:mx="http://www.adobe.com/2006/mxml"xmlns:cairngorm="com.adobe.cairngorm.business.*"mx:WebServiceid 
= "webservice"wsdl = "http://123.456.78.90/webservice/webservice.asmx?wsdl"result 
= "event.token.resultHandler(event)"fault = 
"event.token.faultHandler(event)"//cairngorm:ServiceLocator

index.mxml 
- Main App
private 
function init():void{var call:AsyncToken = 
ServiceLocator.getInstance().getService("webservice").getData();call.addEventListener(mx.rpc.events.ResultEvent.RESULT, 
resultHandler);}

When I use 
it this way I've got still an error from the debug player: "resultHandler is no 
function".

Any other 
ideas?

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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



[flexcoders] Handle result/fault from webservice call in Cairngorm 2

2006-07-04 Thread Artur Kordowski





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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] Handle result/fault from webservice call in Cairngorm 2

2006-07-04 Thread Tom Chiverton
On Tuesday 04 July 2006 11:15, Artur Kordowski wrote:
 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
 var call:AsyncToken =
 ServiceLocator.getInstance().getService(webservice).getData();

Eww. 
Why not use a delegate ?

 still docs for Cairngorm 0.99

That had delegates that worked the same way as in 2.0

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



 Yahoo! Groups Sponsor ~-- 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Handle result/fault from webservice call in Cairngorm 2

2006-07-04 Thread Stacey Mulcahy














With Cairngorm, have your commands
implement the Command and the Responder, then you have the onResult and onFault
calls to handle as you will. You pass the reference of the command to the
delegate, and you should be good to go. The delegate does the real work of
hitting up the webservice and the command executes the call, and handles the
result of that call whether it be successful or a fault.











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL
Sent: Tuesday, July 04, 2006 10:34
AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Handle
result/fault from webservice call in Cairngorm 2













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 - 



From: Artur Kordowski






To: flexcoders@yahoogroups.com






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








   



  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___