It turns out that because of the way that Royale binds methods, there’s no need
to pass around “this” to these functions.
You can just do this:
var foo:Foo = new Foo();
var increment:Function = debounceShort(foo.increment,30);
And then happily call increment(n) and it’ll automatically just work
Hi Harbs,
Great addition!
wt., 4 sty 2022 o 16:17 Harbs napisał(a):
> FYI:
>
> “Debounce” is a term that AFAIK was made popular by underscore.
> https://underscorejs.org/#debounce
>
> There’s debounceLong which does the same thing as underscore’s default
> debounce functionality. Royale's
FYI:
“Debounce” is a term that AFAIK was made popular by underscore.
https://underscorejs.org/#debounce
There’s debounceLong which does the same thing as underscore’s default debounce
functionality. Royale's version also has the option to pass in a “this” object.
That’s necessary if you are