Re: [royale-asjs] branch develop updated: Added debounceShort and debounceLong

2022-01-04 Thread Harbs
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

Re: [royale-asjs] branch develop updated: Added debounceShort and debounceLong

2022-01-04 Thread Piotr Zarzycki
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

Re: [royale-asjs] branch develop updated: Added debounceShort and debounceLong

2022-01-04 Thread Harbs
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