java.lang.IllegalArgumentException: Cannot find mapping: SIMPLEAPP_Exit

It seems like everyone but me is able to remap SIMPLEAPP_Exit.



When I do this, I crash and get the following error



java.lang.IllegalArgumentException: Cannot find mapping: SIMPLEAPP_Exit

Are you using:

[java]inputManager.deleteMapping(SimpleApplication.INPUT_MAPPING_EXIT);[/java]

in simpleInitApp()?



This code works fine in latest stable:

[java]package mygame;

import com.jme3.app.SimpleApplication;



public class RandomTest extends SimpleApplication {



public static void main(String[] args) {

new RandomTest().start();

}



@Override

public void simpleInitApp() {

inputManager.deleteMapping(SimpleApplication.INPUT_MAPPING_EXIT); //can also just use INPUT_MAPPING_EXIT

}

}[/java]

Thank you. The tutorials seemed to be telling me to use “inputManager.deleteMapping(INPUT_MAPPING_EXIT);” Your line seems to work, though.



I had thought to just try/catch it. That worked, but didn’t feel or look right.

INPUT_MAPPING_EXIT will work as long as your inside the SimpleApplication derived class, as it is a public static variable of it, else you need to use SimpleApplication.INPUT_MAPPING_EXIT. So if your in simpleInitApp() either one should work