Constructor NodeHandler - uses or overrides a deprecated API

I figured I should use the nightly snapshot of JME, as I'm still using 0.9 and suffering from the Java VM not exiting when the application ends. My code taken from a demo doesn't work:

Compiling 7 source files to /home/mike/Development/Java/Test1/build/classes
/home/mike/Development/Java/Test1/src/test1/ cannot find symbol
symbol  : constructor NodeHandler(OldLevelLoader,com.jme.scene.CameraNode,java.lang.String)
location: class com.jme.input.NodeHandler
        input = new NodeHandler(this, camNode, properties.getRenderer());
Note: * uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
BUILD FAILED (total time: 0 seconds)

I thought I saw a post somewhere explaining the changes to input between 0.9 and CVS - does anyone have a link to it?


Well, apparently NodeHandler has changed since the previous version you were using.  The following constructors exist now:

NodeHandler(Spatial node, String api)

NodeHandler(Spatial node, float keySpeed, float mouseSpeed)

NodeHandler(Spatial node, float mouseSpeed)

Hope that helps.


Where this one is the preferred one:

darkfrog said:

NodeHandler(Spatial node, float keySpeed, float mouseSpeed)

So omit camNode and properties.getRenderer() and put a key speed and mouse speed instead.

Btw. your error has nothing to do with the deprecation message. To see the deprecation warnings recompile as stated by the compiler.