And what's even stranger, but I forgot to mention in my last post.

The compiler produces the JS debug version correctly and it seems to be 
runnable, but as the compiler returns a set of problems, the build fails.


Chris

________________________________
Von: Christofer Dutz <christofer.d...@c-ware.de>
Gesendet: Mittwoch, 5. Oktober 2016 15:55:00
An: dev@flex.apache.org
Betreff: [FlexJS] Confusion about compilaton

Hi,


I am currently digging though some things Carlos recent posts made me aware of. 
Especially his comment about the maven build double compiling stuff. I did 
stumble over something while setting up a first pure-js testsuite test.


In this module I want to create the JS version of the HelloWorld project. I was 
confused, why it wanted me to provide the flash.display.DisplayObject ... so I 
added playerglobal and the project built just fine (the same way the 
application archetype is). The output worked in Flash and in JavaScript. But I 
thought "Hey ... it's pure JS so why do I need playerglobal?". If I omit the 
playerglobal, the JS Compiler complains about MXMLDataInterpreter missing the 
definition of flash.display.DisplayObject. Having a short look at the class 
definition this is clearly inside a "COMPILE::SWF" block. Which makes sense as 
this is the way the SWC was compiled. But how should I compile the core modules 
in order to use them in a pure JS compilation? Wouldn't I need all the classes 
in a version compiled with "COMPILE:JS" set to True?


But why do all the examples work? The code should be invalid as it's the SWC 
code variant that seems to be used. Or is it that the Flash code contains the 
"SWC" version and the "js/out" contains the "JS" version? Then I still don't 
understand why my examples are running nicely the way they are currently.


Chris

Reply via email to