In FlexJS, you are writing ActionScript. So you would write: import org.apache.flex.html.Label; var foo:Label = new Label();
The output JS will look like: var foo = new org_apache_flex_html_Label(); But hopefully you’ll never see it because you’ll never have to debug the JS side. But I think when you do you’ll understand. The engineer who suggested this claimed it made a difference performance-wise, but again, this is for the debug version. The minified JS that you’ll deploy is even more cryptic. And way faster. Try hitting the debuggable and release version of FlexJSStore. Links are in the other thread. -Alex On 1/23/15, 11:09 PM, "jude" <flexcapaci...@gmail.com> wrote: >Part of what you said concerns me. If I want to create a Label() at >runtime >in JS will I have to use var label = new org_apache_flex_html_Label()? How >will I know the full path name? > >Can you do a performance test and see how much difference there is between >calling org.apache.flex.html.Label() and org_apache_flex_html_Label()? > >On Fri, Jan 23, 2015 at 3:40 PM, Alex Harui <aha...@adobe.com> wrote: > >> Hi, >> >> Right now, if you compile the FlexJSStore example, you’ll get some 600 >> warnings from the Google Closure Compiler that say: >> >> WARNING - incomplete alias created for namespace org.apache.flex >> >> From my understanding, these 600 warnings can show up because the >> “namespace” really is an object tree (an object called ‘org’ with a >>child >> object called ‘apache’). The optimizer will reduce org.apache.flex to, >> for example, a simple variable called ‘Mc’ and any code that relies on >> their being an object tree can fail. >> >> AFAICT, we don’t rely on the object tree. Further, the original >>FalconJS >> engineer pointed out to me that if you don’t optimize away the object >> tree, then when you do: >> >> new org.apache.flex.html.Label(); >> >> the runtime actually fetches an object called ‘org', then an object from >> it called ‘apache’, etc, so it affects the performance of debuggable >>code >> (which is why the optimizer does away with it). >> >> So, I’m going to modify FalconJX to output the class as >> org_apache_flex_html_Label and refer to it as such. Let me know if you >> can think of a reason not to do this. >> >> Thanks, >> >> -Alex >> >>