incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Heidegger ...@leichtgewicht.at>
Subject Re: Flex adopting haXe ?
Date Wed, 22 Feb 2012 18:09:40 GMT
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.


Mime
View raw message