Re: NSOutlineView/NSTableView sorting?
Re: NSOutlineView/NSTableView sorting?
- Subject: Re: NSOutlineView/NSTableView sorting?
- From: Brian Webster <email@hidden>
- Date: Sat, 19 Jan 2002 11:44:09 -0600
On Saturday, January 19, 2002, at 10:59 AM, cocoa-dev-
email@hidden wrote:
just to be sure:
is it true that the dataSource itself is responsible for
sorting the items
shown in a NSTableView or NSOutlineView?
Yes, if you want to sort, just sort the items in the order you
want in your data source and then send a reloadData message to
the table/outline view. If you store your stuff in an
NSMutableArray, the sortArrayUsingSelector: method is useful to
do the actual sorting.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster