You should generally avoid using anonymous functions, as they're more
expensive than methods. In AS3, every method is a closure. If an event
handler is a method, it can access everything in the class.
 
Gordon Smith
Adobe Flex SDK Team

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Vadim Melnik
Sent: Wednesday, February 13, 2008 8:37 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] addEventListener question



It should be  possible with "closures":
 
...
addEventListener("result", Closure.create(this, function(evt:*, p1:*,
p2:*, ... rest):void {
   ... 
}, param1, param2);

 
http://flexblog.faratasystems.com/?p=125
<http://flexblog.faratasystems.com/?p=125> 
 
Or just bypass it as container member variable...
 
--
Thanks,
Vadim.
 

        ----- Original Message ----- 
        From: markgoldin_2000 <mailto:[EMAIL PROTECTED]>  
        To: flexcoders@yahoogroups.com
<mailto:flexcoders@yahoogroups.com>  
        Sent: Wednesday, February 13, 2008 6:16 PM
        Subject: [flexcoders] addEventListener question
        
        

        I am addining listeners doing this:
        addEventListener("result", httpResult)
        Is there a way of providing additional to ResultEvent parameters
to a 
        function (httpResult) we are using as a callback function?
        
        Thank for help.
        
        

 

Reply via email to