Yes, check the events and also the ACT pattern that is discussed in the
docs.

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of mvbaffa
Sent: Thursday, February 23, 2006 3:50 AM
To: [email protected]
Subject: [flexcoders] Re: Delegation and Callbacks

Hi Matt,

What I need is to callback a function at the object that 
instantiated my class. 

My class wraps the flex webservice object, it calls the webservice 
operations e drives the result event so that the operation can be 
executed synchronously.

The class needs a reference of a function to be called back before 
it calls the webservice operation. In .NET we have a delegation 
process implemented so that we define a delegate that will be driven 
by anyone who needs to receive the event.

In Flex 2.0, I presume, that this can be implemented by the 
listeners, like in java. Is it the right feature to be used or there 
is simething more adequate ????

Thanks in advance

--- In [email protected], "Matt Chotin" <[EMAIL PROTECTED]> wrote:
>
> Sorry, I'm not sure I get what you're trying to do.  When you say
> delegate do you mean the 1.5 mx.utils.Delegate?  We don't need 
that in
> 2.0 because we have closures which means that the function will 
maintain
> the correct "this" pointer.  Or are you looking for a different 
delegate
> class?
> 
> -----Original Message-----
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of mvbaffa
> Sent: Monday, February 20, 2006 4:59 AM
> To: [email protected]
> Subject: [flexcoders] Delegation and Callbacks
> 
> Hi everybody,
> 
> I have developed an ActionScript class to help synchonize 
WebService 
> calls. 
> 
> You have to create an instance of it in the load event of the 
> WebService. Then the class initializes some internal data 
structures 
> looping through the webservice operations and drives the result 
> event.
> 
> At the initialization process the class receives also a 
> setupCallback function parameter so that the application can 
define 
> methods to be called before the webservice operation is sent and 
> after the result event is fired. This setupCallback function is 
> called by the class when it is initializing.
> 
> I Would rather use a delegate to communicate with the application. 
> How can I define and use delegation in Flex 2/ActionScript 3
> 
> Thanks in advance
> 
> 
> 
> 
> 
> 
> --
> 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
>







--
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



 




--
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/
 


Reply via email to