What is getID() in appstates in jme3.3.0?

what is getId() method in appstate that I must implement it?
what value have to return?

1 Like

This question was just asked on discord and I said:

Whatever you want. But you should really be extending a base class for your app states. Either AbstractAppState or BaseAppState (the latter is preferred in general because it does more helpful things).

Itā€™s for looking up your app state by ID if you want to later.

Itā€™s also described in the javadoc:
https://javadoc.jmonkeyengine.org/v3.3.0-stable/com/jme3/app/state/AppState.html#getId--

(Note: the forum is still pointing to really old javadoc in its javadoc link.)

2 Likes

@jayfella

It points to a page where you choose the version. What address would you like me to point it to?

Its good as is.

This link:
image

Points to 3.x

Is that the old theme?

Mmmā€¦ could be. I never switched to anything new. So maybe itā€™s just me then.

Just checked. That is *Definitely" the old theme. Apparently, it has some sort of hard-coded header that points to the 3.x javadoc.

Since the new theme has become the standard, I guess paul kept the old theme.
Probably because he once said that he likes having links more than collapsible menus

Iā€™ve fixed the ā€œoldā€ theme link. You might have to CTRL+R or F5 or something for it to take effect.

2 Likes

Works. Thanks for supporting my curmudgeonly demeanor. :slight_smile:

2 Likes

Stupid follow up question - what is an example of use cases for this? iā€™ve just updated to 3.3.0 and just di a a ā€œreturn ā€˜classnameā€™ā€ sort of thing - but i dont know how it could be used

ā€¦

1 Like

Thanks you :slight_smile: