This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

should I implement both tablemodel and treemodel?  RSS feed

 
Eliot Skywalker
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have both a tree and a table refer to same piece of data
and I want them to be synchronized ( better in an easier way )
so do I have to make my model class implement both the tablemodel & the treemodel?
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A rare case in which multiple inheritance (which Java doesn't have) would come in handy! Yes, you will have to implement both models or write some painful synchronization code between the two.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!