at com.jme3.niftygui.SoundDeviceJme.loadSound(SoundDeviceJme.java:55)
at de.lessvoid.nifty.sound.SoundSystem.addSound(SoundSystem.java:45)
at de.lessvoid.nifty.loaderv2.types.RegisterSoundType.materialize(RegisterSoundType.java:12)
at de.lessvoid.nifty.loaderv2.types.NiftyType.create(NiftyType.java:109)
at de.lessvoid.nifty.Nifty.loadFromFile(Nifty.java:497)
at de.lessvoid.nifty.Nifty.fromXmlWithoutStartScreen(Nifty.java:408)
[…]
[/java]
when I try to.
EDIT: For now I just return a null from those methods. Simpler that way. I don’t have sound in the GUI but I can live with that for now It’s not a big deal.
And while I’m not looking at the latest code from SVN, I am looking at JME’s online Javadoc.
I try to only update JME when I have time to do some extensive regression and performance testing or I’d try it myself. But you should be able to use JMP to see if SoundHandleJme implements that interface and that the interface exists. If you try to view the source, JMP will generate fake source for classes it knows about but doesn’t have source for.
Everything looks fine on my end too. So not exactly sure why it does that. Just for kicks I compiled the game and ran it from outside the SDK and sure enough, it failed.
I don’t know how you build but that sounds precisely like what I was talking about: JMP will occasionally report things as errors that are not… especially when it comes to attempting to refer to an object by one of its implemented interfaces. Sometimes there is a way (as you’ve discovered) to get it to update its cache and make it work.
But in ALL cases that I’ve had that happen, doing a “clean build” will allow me to run the application… even though the JMP still shows the file as red and won’t compile it properly. ANT gets it right even when JMP doesn’t because it’s using javac.
I actually do nothing lol. These error (two up to now) have cropped up after updating jME’s Subversion.
The space thing is the only way I can get rid of the error. Clean & Rebuild doesn’t do anything except the obvious rebuilding.
If I had to take a guess, I would say that somehow, for some reason, that space between the implemented class name and the “{” gets bugged, maybe becomes a non-printable character that is seen as a white space, but that’s so far-fetched that I don’t really believe that.
It has also happened in the past that I had a corrupted or two updates from googlecode…
In the end, as long as that fix works, it’s good. At the point where it won’t I’ll probably post it here.
When a space fixes it for me it’s just a matter of getting the file to be different so it recompiles in the IDE… so that it recaches the info for the file that is actually having a problem with it.