On 6/29/15, 1:17 PM, "Frédéric THOMAS" <[email protected]> wrote:

>>>Now, if I run the index.html from js-release in the browser, I got
>>>"Uncaught ReferenceError: Main is not defined" whatever start() is
>>>public
>>>or not.
>>
>> I will take a look. Interestingly, I cannot duplicate the constructor
>> containing the private function body, so I don’t know why you are
>>getting
>> different results than me.
>
>The constructor does contain a private function body here, but a public
>function:
>
>>> private function start():void {
>>> HtmlContainer.load([JQUERY_SCRIPT], run);
>>> }
>
>is translated to:
>
>/**
> * @private
> */
>Main.prototype.start = function() {
>  HtmlContainer.load([Main.JQUERY_SCRIPT], Main.run);
>};

OK, maybe I didn’t understand you earlier, but yes, the above is what I
see in the output.

>
>and there's is no compile time check for start() called from the html
>script because 
>this one is not compiled by jscomp.
>
>I was thinking and hoping we had some runtime enforcements but realized
>we have none, 
>the opposite could have make me love more JS whenever I had to debug a
>FLEXJS output
>type only application.

Well, IMO, in most cases you won’t need runtime enforcement because, other
than this particular entry point, all other code paths should get checked
by the compiler.  If you want to add a specific check for the entry point,
that’s fine with me.

The release version of my test app does get called and executed by the
browser.  Maybe post the html that was generated?

-Alex

Reply via email to