Hi,
i've got a little problem with my ListField:
I add 3 Items to my Listfield, now i want to refresh then, so i try to delete them all and add them again.
It is possible that there are 4 items before and after the refresh there should be 2 Items.
here is my source, maybe anyone can say me what's wrong with it:
Code:
public ListField myList = new ListField();
public ListCallback myCallback = new ListCallback();
// ...
public void drawList () {
String fieldOne = new String("Zeile 1");
String fieldTwo = new String("Zeile 2");
myList.setCallback(myCallback);
myList.insert(0);
myList.insert(1);
myList.insert(2);
myCallback.insert(fieldOne,0);
myCallback.insert(fieldTwo,1);
myCallback.insert(fieldOne,2);
add(myList);
}
public void updateList() {
String neu = new String("--> "+System.currentTimeMillis());
myList.insert(0);
myCallback.insert(neu,0);
myList.invalidate();
//*/
}
After the refresh there is just one item, ok thats correct, but in the first row does not appear the timestamp. It's always displayed "Zeile 1".
What is wrong?
thanks hibbert