Hi all,
So we did an AS3->Haxe conversion that went well. We can run the units from haxe with -swf output no problem. However, we need to back-integrate the converted haxe code in as3 for use in MXML applications.
For that I'm using -as3 target. A sample of my hxml looks like:
-lib air3
--macro "include('react', true, [])"
#--macro "include('com', true, ['com.hurlant.crypto.tls'])"
--macro "include('com', true)"
--macro "include('core', true, [])"
--macro "include('events', true, [])"
--macro "include('interfaces', true, [])"
--macro "include('util', true)"
-swf-version 23
-as3 asLib
The compile goes out and spits out a bunch of .as files to /asLib. However, when I compile this directory in my flex app I get the following errors:
Description Resource Path Location Type
1180: Call to a possibly undefined method __foreach__. NativeValueIterator.as /uiLib/[source path] asLib/haxe/ds/_ObjectMap line 19 Flex Problem
1180: Call to a possibly undefined method __foreach__. NativeValueIterator.as /uiLib/[source path] asLib/haxe/ds/_WeakMap line 19 Flex Problem
1180: Call to a possibly undefined method __forin__. NativePropertyIterator.as /uiLib/[source path] asLib/haxe/ds/_ObjectMap line 19 Flex Problem
1180: Call to a possibly undefined method __forin__. NativePropertyIterator.as /uiLib/[source path] asLib/haxe/ds/_WeakMap line 19 Flex Problem
1180: Call to a possibly undefined method __has_next__. NativePropertyIterator.as /uiLib/[source path] asLib/haxe/ds/_ObjectMap line 11 Flex Problem
1180: Call to a possibly undefined method __has_next__. NativePropertyIterator.as /uiLib/[source path] asLib/haxe/ds/_WeakMap line 11 Flex Problem
1180: Call to a possibly undefined method __has_next__. NativeValueIterator.as /uiLib/[source path] asLib/haxe/ds/_ObjectMap line 11 Flex Problem
1180: Call to a possibly undefined method __has_next__. NativeValueIterator.as /uiLib/[source path] asLib/haxe/ds/_WeakMap line 11 Flex Problem
If I remove the directory /uiLib..../ds/_ObjectMap, for example, some of the errors go away. and if I remove _WeakMap, _ObjectMap, then all the errors go away. However there's obviously something wrong with the haxe as3 generation, and I'm not sure what's going on.
Secondly, once these errors are gone, I'm getting an immediate crash when running the app. I poked around a bit and found new __main__() seems to initialize the internal Boot MovieClip (Boot.mc). But I'm not sure if there's a better entry point I should be using.
So two questions:
1) What is thedeal with the __forin__ and other calls missing?
2) Is there a better entry point than new __main__()?
Thanks for the help!