Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenFL compatibility #15

Open
Gama11 opened this issue May 9, 2018 · 2 comments
Open

OpenFL compatibility #15

Gama11 opened this issue May 9, 2018 · 2 comments

Comments

@Gama11
Copy link
Contributor

Gama11 commented May 9, 2018

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
@RealyUniqueName
Copy link
Owner

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());
}

@Gama11
Copy link
Contributor Author

Gama11 commented May 10, 2018

Yep, it does, probably should have mentioned that. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants