On 23/02/2012 02:01, Nicolas Cannasse wrote:
Le 22/02/2012 17:56, Martin Heidegger a écrit :

in haXe case, "this" is always the object in which the local function
function has been declared, not the one on which the event listener is
added.

Did you see my example code? I am not sure how to name that particular
difference.

In ActionScript you can pass a method reference like this

addEventListener(Event.COMPLETE, this.onComplete);

And any caller of this anonymous function would be calling the this
where its coming from.

Yes, closure creation is supported by haXe as well.

Best,
Nicolas
Uh *facepalm* I had a typo in the short sample code that I pulled together.

thanks: those closures are awesome, just what I need :)

yours
Martin.

Reply via email to