Hi,
> Are you sure the Google Closure Compiler will handle code outside methods
> "properly". IMO, "loose code" isn't very OO, and may confuse how variable
> renaming and dead code removal works.
Absolutely no idea but it’s probably easy enough to try and see.
Thanks,
Justin
Are you sure the Google Closure Compiler will handle code outside methods
"properly". IMO, "loose code" isn't very OO, and may confuse how variable
renaming and dead code removal works.
Just wondering...
-Alex
On 3/20/17, 3:38 PM, "Harbs" wrote:
>Even better.
>
>I don’t know why I never though
Even better.
I don’t know why I never thought of trying this stuff.
> On Mar 21, 2017, at 12:32 AM, Justin Mclean wrote:
>
> Hi,
>
>> I assume anonymous self invoking functions do not work in AS. Right?
>
> No need for a function you can just put in a static code block like so:
>
> {
> code
Hi,
> I assume anonymous self invoking functions do not work in AS. Right?
No need for a function you can just put in a static code block like so:
{
code goes here;
}
Justin
Like this?
(function()
{
//do stuff
})();
I don't see why not.
- Josh
On Mon, Mar 20, 2017 at 3:18 PM, Harbs wrote:
> Thanks. Right. I should have realized that myself.
>
> I assume anonymous self invoking functions do not work in AS. Right?
>
> > On Mar 20, 2017, at 11:55 PM, Josh Tynjal
Thanks. Right. I should have realized that myself.
I assume anonymous self invoking functions do not work in AS. Right?
> On Mar 20, 2017, at 11:55 PM, Josh Tynjala wrote:
>
> Sorry, I misspoke. Don't put it in the package block. It should be inside
> the class. This is the way to do it:
>
> h
Sorry, I misspoke. Don't put it in the package block. It should be inside
the class. This is the way to do it:
https://paste.apache.org/P1Qq
- Josh
On Mon, Mar 20, 2017 at 2:53 PM, Josh Tynjala wrote:
> I know you can call static functions from inside the package block. Simply
> put your loop
I know you can call static functions from inside the package block. Simply
put your loop inside the static function. Here's a simpler example that you
should be able to modify to add your loop:
https://paste.apache.org/dcVo
It's certainly possible that FalconJX will mangle this code when emitting
Is there a good way to initialize static variables?
I have a class which has a large static object and I need to initialize about
100 attributes in a loop. It’s actually a class being ported from Javascript.
In Javascript, it’s pretty easy to do this. You just write the loop right after
declari