GameStateNode:activateChildNamed(String name)

Same comments as: http://www.jmonkeyengine.com/jmeforum/index.php?topic=6074.0



I was curious why the GameStates were held in an ArrayList instead of a map if they were intended to be accessed through a string.



Also attachChild(String name) doesn’t check for other states of the same name nor is there a direct way to tell if there is an existing state of that name. So if you add a state without removing the other with the same name(because you didn’t know it was there) your state that you just added wont be the one that’s active after a call to activateChildNamed(String name)

That's because name is "optional".

imo that's no reason to make delicate code

It's not delicate.  It's working exactly as it should.



If you choose to rely on String names as a way to distinguish between Spatials it provides a mechanism to do so, but it's a flaw in your code if you choose to rely on it and then name two things the same thing and expect it to work.  :stuck_out_tongue:



…but ya know, that's just my opinion and I'm often accused of being a jerk. 

I don't think anyone should be called a jerk because of coding style