It is currently 08 Sep 2025, 03:54
   
Text Size

TableSorter.java use?

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

TableSorter.java use?

Postby slapshot5 » 05 Nov 2010, 14:23

What is TableSorter.java used for? Anything? It's constructor calls a function that reads from cards.txt, which can't be helping anything. (It for sure gets called when opening the Deck Editor.)

Does this need to be updated to use cardsfolder, or can this be nuked, and references deleted/updated?

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: TableSorter.java use?

Postby mtgrares » 05 Nov 2010, 17:50

TableSorter is used to sort the cards in the Deck Editor. It sorts by card name, etc...

TableModel.sort() creates TableSorter and the code looks ok, although I can't be 100% sure. If you have problems look at Gui_DeckEditor since it calls TableModel.

The two lines in the TableSorter constructor that reads cards.txt looks like it could be removed.

Code: Select all
if(cardsTxt == null)
      cardsTxt = readCardsTxt();
(I wrote this code a long, long time ago in a galaxy far, far away.)
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 31 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 31 users online :: 0 registered, 0 hidden and 31 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 31 guests

Login Form