Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

AbstractTableModel, to wrap or not to wrap?  RSS feed

 
Chiji Nwankwo
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone tell me if they are wrapping the array of DataInfo objects passed back from the criteriaFind() method, before passing it onto the AbstractTableModel subclass. Or are you just dealing with the raw DataInfo objects and arrays directly?
What is the best approach? It seems when you try to use anything other than two dimensional arrays, it becomes a bit unpleasant.
Please advise.
Thanks,
Chiji
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I passed the DataInfo class to a method called setDataArray.
In this method I transform the DataInfo class into an Object[][]. It takes only three lines of code.
first create the Object[][] Loop through each record int DataInfo, and call getValues.
Mark
 
Chiji Nwankwo
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is getValues one of your own methods?
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have a getValues method in my TableModel class.
Oh I see, no that is a method provided to you in the DataInfo class.
Mark
[ July 02, 2002: Message edited by: Mark Spritzler ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!