JStack
JStack copied to clipboard
OpenFL compatibility
JStack doesn't seem usable with OpenFL projects atm, because it doesn't support constructors / new() as entry points.
> openfl create project JStackTest
> cd JstackTest
Add this to project.xml:
<haxelib name="jstack" />
<haxedef name="JSTACK_MAIN=Main.new" />
Running openfl test html5 results in this error:
Source/Main.hx:12: characters 2-10 : Cannot call super constructor outside class constructor
Source/Main.hx:10: lines 10-16 : Missing super constructor call
Versions used:
- JStack 2.3.9
- OpenFL 8.0.1
- Lime 6.3.0
- Haxe 3.4.7
Till this is fixed you can use ordinary entry point as a workaround. AFAIR OpenFL supports it.
class MyClass extends Sprite {
static public function main() Lib.addChild(new MyClass());
}
Yep, it does, probably should have mentioned that. 👍