Saturday, May 4, 2013

Packages and Imports in Haxe

Unlike in Actionscript, it looks like you must conform to the "Constant-Class" rule when naming packages.

--Notes------------------
The class path:
import com.JMIM.TestClass;

Gave me an error "Unexpected com" or something like that.
I thought it might be namespace collision since the NME library also has a com folder so I tried:
import dotCom.JMIM.TestClass;

And changed the folder structure accordingly only to end up with the same error.

During this whole time I did make sure to add my personal library by putting another source path tag into the .nmml file.

Then I started getting errors something along the lines: "Unexpected class JMIM" or something.

I changed it to:
import dotCom.jmim.TestClass;

Getting closer to a compile. :)
Also, it looks like restarting my computer after messing extensively with the package structure MIGHT
be the way to go once you've done everything you can think of.
--------------------------

No comments:

Post a Comment