Re: [Java-gnome-developer] Arrays/Vectors problem with Entry class
Brought to you by:
afcowie
From: Adam J. <ajo...@re...> - 2005-06-03 19:52:04
|
Adam Jocksch wrote: > I'm having a problem trying to call Entry::setText(...) with an > element of an array/Vector. The element is set correctly, but after > that the rest of the array/Vector is cleared to empty strings. From > what I've glanced in the source code, I'm suspecting that > (*env)->ReleaseStringUTFChars(env, text, text_g); > in > JNIEXPORT void JNICALL Java_org_gnu_gtk_Entry_gtk_1entry_1set_1text > (JNIEnv *env, jclass cls, jobject entry, jstring text) > is to blame, but I'm not sure. Does anyone know of a way to fix this, > or am I going to have to resort to cloning everything I throw into > Entry::setText()? > > Thanks, > Adam > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office > luge track? > If you want to score the big prize, get to know the little guy. Play > to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer And the code that's causing the problem for(int i = 0; i < sseData.size() - 1; i++){ ((Entry)glade.getWidget("xmm"+i+"Text2")).setText((String) sseData.elementAt(i)); }: sse is Initialized here: for(int i = 0; i < 8; i++){ sseData.add(((Entry)glade.getWidget("xmm"+i+"Text2")).getText()); } Adam |