js2hx icon indicating copy to clipboard operation
js2hx copied to clipboard

Uncaught exception - Invalid field access : split

Open belohlavek opened this issue 10 years ago • 3 comments

Hey! I'm trying to convert the latest Phaser version (2.2.2) to a Haxe extern (first time using Haxe).

So, I ran the build.hxml file and got the js2hx.n file which I then executed with neko as explained in the README file. I'm using the phaser-master/src folder as input and the program returns the following error:

Parsing AST... Called from ? line 1 Called from Main.hx line 149 Called from Main.hx line 7 Called from Main.hx line 21 Called from Main.hx line 39 Called from Main.hx line 39 Called from Main.hx line 43 Called from Parser.hx line 34 Called from Parser.hx line 137 Uncaught exception - Invalid field access : split

I hope you can help me, thanks for reading!

belohlavek avatar Feb 16 '15 00:02 belohlavek

Be sure you are using Dox 0.4.4.

hexonaut avatar Feb 16 '15 12:02 hexonaut

Thanks, I was able to run it with version 0.4.4.

Question: the program can not resolve PIXI types. How should I handle this? I saw that in your haxe-phaser project you managed to get 'phaser.pixi.primitives.Graphics'.

belohlavek avatar Feb 16 '15 12:02 belohlavek

In the phaser project there is a fair amount of manual adjustments. The js2hx externs generator should just be used as a starting point.

hexonaut avatar Feb 16 '15 13:02 hexonaut