In 1.5 the web service doesn’t cleanly support adding event listeners at runtime, you’d need to do it at compile-time through the tag (this is changing in the next version).  But you could delegate this work if you wanted by using something like a Responder as mentioned in the Cairngorm framework and the iteration::two book.

 

Matt

 


From: Manish Jethani [mailto:[EMAIL PROTECTED]
Sent: Monday, April 04, 2005 12:56 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Events and Components

 

On Apr 4, 2005 11:40 PM, gevgelija50 <[EMAIL PROTECTED]> wrote:

>      <mx:operation name="GetResults" result="{dispatchEvent
> ('GetResults');}" />
>
> In my component, I am trying to add a listener as follows:
>
> this.parent.Webservice1.GetResults.addEventListener("GetResults",
> doSomething)

I'm not sure if this'll work, but try passing the result object as a
part of the GetResuts event.  So in your doSomething() you get the
event object which contains the result object.

Manish



Yahoo! Groups Links

Reply via email to