BTW, I just ran a quick test of adding an XML and XMLList class to the DragDrop SWC.
I create XML.as in DragDrop/as/src package { public class XML { public function XML() { } } } XMLList is essentially the same. Then in DragDropClasses I added: COMPILE::JS { import XML; XML; import XMLList; XMLList; } Then I ran “ant all” and I saw it cross-compile them and the SWF SWC built without them. -Alex On 11/10/15, 2:57 PM, "Harbs" <harbs.li...@gmail.com> wrote: >OK. I’ll try working with ant for now. > >I’ll try getting some code to compile in the morning. If there’s no code >completion for now anyway, I’ll just set -define=COMPILE::JS,false for >now. That will at least allow me to use FB as a code editor. Maybe I’ll >see if Sublime give me some code completion. > >I see what you did with gecko_xml.js. If I’m missing anything else, I >think I understand how to add more externs. > >Hopefully I got enough to be productive now. > >Wish me luck! ;-) > >Harbs > >On Nov 11, 2015, at 12:47 AM, Alex Harui <aha...@adobe.com> wrote: > >> >> >> On 11/10/15, 1:50 PM, "Harbs" <harbs.li...@gmail.com> wrote: >> >>> I just tried in Core as well. If I set “-define=COMPILE::JS,true” which >>> is what I believe we need to get code recognition and completion, I get >>> lots of errors in FB. >>> >>> Am I going about this wrong? >> >> As I said in at the beginning of my last reply, I don’t know what it >>will >> take to get FB to accept these definitions from js.swc. I understand it >> will make it easier for you and others to contribute once we get FB >> working on these projects, but I would much prefer not to have to take >>the >> time to figure it out for the core_js_to_as branch until we are mostly >> done with the back port and have restructured the folders to a more >>final >> topology. Otherwise, I think I will have to keep stopping to tweak the >> projects as we go and the whole thing will take longer. Do you really >> have to have code hinting to get started on this XML library? Or maybe >> just start coding it in a temporary package for now. You can probably >>add >> some glue code to the output to map that class to the global scope. >> >> The COMPILE::JS flag only controls what code the compiler has to >>compile, >> not what definitions it is pulling in from various SWCs. >> >> From the command-line with Ant, I just tried building the Core project >>by >> switching to frameworks/projects/Core and then: >> 1) ran “ant -Dis.jenkins=true all” which proved it could build cleanly >>but >> skipped the tests >> 2) Edited Application.as and inside a COMPILE::JS block added: >> var foo:DOMParser = null; >> var bar:Document = null; >> 3) ran “ant -Dis.jenkins=true all” again to see if would compile. >> >> It was missing DOMParser which I just added and pushed to flex-falcon so >> sync up and at least run “ant extern.swcs” there. Then step 3 worked >>for >> me. >> >> Please first try the Ant steps so at least we know that works for you. >> >> -Alex >> >>> >>> On Nov 10, 2015, at 9:40 PM, Alex Harui <aha...@adobe.com> wrote: >>> >>>>> I’m not sure you answered my primary question here. How do I target >>>>> HTML/JS native classes like Document, DOMParser, etc. in >>>>>ActionScript? >>>>> I >>>>> don’t want to do that in js. I’d rather have FlaconJX cross-compile >>>>>it >>>>> for me. >>>> >>>> Not sure about what FlashBuilder will let you do, but from Ant, you >>>> should >>>> be able to use Document, DOMParser etc inside COMPILE::JS blocks. Try >>>> adding test code to a class in the Core project and compile it. Then >>>> we’ll worry about FlashBuilder. It should work for Core because the >>>> compile-asjs phase will not use playerglobal/airglobal, it will use >>>> js.swc >>>> from the Falcon repo which has Document and DOMParser in it. >>> >> >