RegisterSearchFAQ UsergroupsLog in
SortTableModel - indexOf on rows returns -1

 
Reply to topic    Citra Technologies Forum Index » Report a Bug View previous topic
View next topic

SortTableModel - indexOf on rows returns -1
Author Message
sirokymartin



Joined: 28 Feb 2013
Posts: 9

Post SortTableModel - indexOf on rows returns -1 Reply with quote
Hi,
I have upgraded to the new version 4.1.14 of citratable, but I have a problem in old application. Calling indexOf on rows of sortedTableModel returns allways -1, here is the example code:
Code:

String testObject = "TEST";

SortTableModel model = new SortTableModel(new ObjectTableModel(new String[]{"col1", "col2"}) {
   @Override
   public Object getValueAt(Object o, int i) {
      return "x";
   }

   @Override
   public void setValueAt(Object o, Object o1, int i) {
      //
   }
});

model.addRow(testObject);

List rows = model.getRows();
System.out.println(rows.indexOf(testObject));

In previous version 3.6.4.2 it worked. I can use some workaround (copy list to my arrayList and call indexOf on it), but I think the example should work. Thanks,
Martin
Fri Jul 12, 2013 1:57 am View user's profile Send private message
sirokymartin



Joined: 28 Feb 2013
Posts: 9

Post Reply with quote
Thank you for the update. In 4.1.15 it works correctly.
Mon Jul 15, 2013 3:04 am View user's profile Send private message
support



Joined: 21 Feb 2006
Posts: 1463

Post Reply with quote
I am sorry, I meant to post a reply saying that this was fixed in version 4.15.

Glad you found it!
Sat Jul 20, 2013 3:53 am View user's profile Send private message
Display posts from previous:    

Reply to topic    Citra Technologies Forum Index » Report a Bug All times are GMT - 5 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group