Hi Tracy,

addEventListener and removeEventListener did the trick.  Thanks a lot.

Regards,

Angelo




________________________________
From: Tracy Spratt <tr...@nts3rd.com>
To: flexcoders@yahoogroups.com
Sent: Friday, 21 August, 2009 3:28:13
Subject: RE: [flexcoders] Re: Changing ResultHandler of WebService Operation

  
Look into AsyncToken.  All the RPC calls,
inclusing WebService return an AsyncToken, which is a dynamic object to which
you can add any property you want, and you can retrieve the value of that
property in the result handler. Set a called property and use a switch
statement to decide how t handle the result.  AsyncToken also supports callback
functions.
 
Further, I am sure you could call
removeEventListener and the addEventListener to actually change the result
handler.
 
Tracy Spratt,
Lariat Services, development services
available

________________________________
 
From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On 
Behalf Of valdhor
Sent: Thursday, August 20, 2009
8:40 AM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] Re: Changing
ResultHandler of WebService Operation
 
  
Probably not. In ActionScript, you would add an event
listener. For a remote object it is...

theRemoteObject. theOperation. removeEventListe ner(ResultEvent. RESULT,
firstResultHandler)

theRemoteObject. theOperation. addEventListener (ResultEvent. RESULT,
secondResultHandler )

I would think it would be the same for a web service although I have not tried 
it.

--- In flexcod...@yahoogro ups.com,
Angelo Anolin <angelo_anolin@ ...> wrote:
>
> Hi FlexCoders,
> 
> How do I change the Result property of a web service operation?
> 
> For example, I have declared my WebService as follows:
> 
> <mx:WebService id="ws">
>   <mx:operation name="Call_One" result="Call_ OneRH(event) "
fault="Call_ OneFH(event) " />
>   <mx:operation name="Call_Two" result="Call_ TwoRH(event) "
fault="Call_ TwoFH(event) " />
> </mx:WebService>
> 
> I want to be able to change the result of the operation
"Call_One" to another result, since I am planning to re-use the same
web service, but the result would be treated differently.
> 
> Will this work?
> 
> ws.operation. Call_One. result = "myOtherResult"
> 
> Any ideas?
> 
> Thanks. Regards.
> 
> Angelo
>
   


      

Reply via email to