perrce
08-25-2008, 08:19 PM
s2kdave: I need a little help with using BMovableList in Bananas-Plus. Right now, I subclass BMovableList and have a createRow() that include this line:
text.setValue( String.valueOf(index + 1) + ". " + ((Playable)this.get(index)).getTrackName() + " - " + ((Playable)this.get(index)).getArtistName());
The important thing is that the items in the list are numbered. When I reorder the list using the mover button, the item that is being moved has it's label updated (presumably because createRow() is called when add() is called in BMoveableList.move() ), but the label on the item being bumped does not. So if I started with a list that looks like this:
1. this
2. is
3. a
4. sample
5. list
and I moved item 3 up one spot, I would end up with a list that looks like this:
1. this
2. a
2. is
4. sample
5. list
Is there any easy way to force an update of the label on the list item that's been bumped? I don't really want to reimplement the entire move() method to force an update. Any suggestions?
text.setValue( String.valueOf(index + 1) + ". " + ((Playable)this.get(index)).getTrackName() + " - " + ((Playable)this.get(index)).getArtistName());
The important thing is that the items in the list are numbered. When I reorder the list using the mover button, the item that is being moved has it's label updated (presumably because createRow() is called when add() is called in BMoveableList.move() ), but the label on the item being bumped does not. So if I started with a list that looks like this:
1. this
2. is
3. a
4. sample
5. list
and I moved item 3 up one spot, I would end up with a list that looks like this:
1. this
2. a
2. is
4. sample
5. list
Is there any easy way to force an update of the label on the list item that's been bumped? I don't really want to reimplement the entire move() method to force an update. Any suggestions?