Re: NSTableView questions...
Re: NSTableView questions...
- Subject: Re: NSTableView questions...
- From: Scott Anguish <email@hidden>
- Date: Sun, 7 Sep 2003 01:56:09 -0400
On Sep 7, 2003, at 12:36 AM, Thomas McQuitty wrote:
That makes perfect sense, as I do have the data being displayed in the
NSTableView..
So, if I have a sort routine for the display, should I be resorting my
datasource? In this case it is a simple NSArray, but just for future
reference...
Well, maybe. :-)
You could maintain a sorted array, and an unsorted array. This allows
you to display the data without actually changing the original data
order. You could decide in the datasource delegate methods which array
is the appropriate one to currently use.
Just ensure that the array objects are the same objects in both arrays
(that is, the indexes point to the same objects, so that changing the
data in one array will change it in the other as well)
Or, if original order isn't important, just sort the datasource
directly.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.