Table sorting in panther
Table sorting in panther
- Subject: Table sorting in panther
- From: rudy_norff <email@hidden>
- Date: Mon, 23 Feb 2004 16:52:58 +0100
Hello,
I am trying to sort a TableView using the Panther methods. I already
figured out how to sort somehow.
- (void)tableView:(NSTableView *)tableView
sortDescriptorsDidChange:(NSArray *)oldSortDescriptors {
// arTasks is my Mutable Array
[arTasks sortUsingDescriptors: [tableView sortDescriptors]];
[self saveData]; // this just saves my array into a plist
[tableView reloadData];
}
By the way, is this the right way of doing things? And another one: I'm
still just a beginner, but sometimes I feel left
alone in the dark by Apples documentation and examples. Am I the only
one feeling like this? This becomes especially true to me
when I look at the table sorting example above!
The sorting works for all columns containing text. But when I select a
column with the content being a number (I have some Popupmenus in my
table) or when I select the column that contains booleans (I have
checkboxes in that column) then it just says something like this:
[NSFCBoolean length]: selector not recognized
Does anybody have an idea to why this is happening? By the way: for
every column I used the sort selector compare: in interface builder,
this should work, right?
thanks for your answers in advance!
- rudy
bis denne
rudy
email@hidden www.mactunes.de
_______________________________________________
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.