first of all, let me thank all the gBUI coders – after many headaches from fenggui etc i finally have a gui for my game.
i'm happy
but i have a question… i have a BScrollingList<String, BButton>, which i initialize using the standard code from the tutorial:
roster = new BScrollingList<String, BButton>() {
@Override
public BButton createComponent(String str) {
BButton b = new BButton(str, listener, str);
b.setStyleClass("buttonlobbyroster");
return b;
}
};
add(roster);
for (int i = 0; i < 2; i++)
roster.addValue("Player #" + i, false);
but later, i call roster.removeValues() and i get this exception. i tried removeAll and i get a similar exception (by the way, what's the difference between removeAll and removeValues??)
java.lang.NullPointerException
at org.lwjgl.opengl.GL11.glDeleteTextures(GL11.java:716)
at com.jme.scene.state.lwjgl.LWJGLTextureState.deleteAll(LWJGLTextureState.java:2112)
at com.jme.scene.state.lwjgl.LWJGLTextureState.deleteAll(LWJGLTextureState.java:2074)
at com.jmex.bui.BImage$1.releaseTextures(BImage.java:391)
at com.jmex.bui.BImage.releaseTexture(BImage.java:366)
at com.jmex.bui.BImage.release(BImage.java:342)
at com.jmex.bui.text.AWTTextFactory$1.wasRemoved(AWTTextFactory.java:340)
at com.jmex.bui.Label$Text.wasRemoved(Label.java:654)
at com.jmex.bui.Label.wasRemoved(Label.java:174)
at com.jmex.bui.BLabel.wasRemoved(BLabel.java:168)
at com.jmex.bui.BContainer.remove(BContainer.java:172)
at com.jmex.bui.BContainer.removeAll(BContainer.java:206)
at com.jmex.bui.BScrollingList.removeValues(BScrollingList.java:82)
any suggestions? my goal is to simply refresh the list with new values. so any alternate way to do that would also work.
it also might be related to this thread http://www.jmonkeyengine.com/jmeforum/index.php?topic=9908.0
(fyi i'm using jme2 and the google code svn/trunk version of gBUI that's probably less than a week or two old)