Re: Set NSTableColumn Arrow up/down
Re: Set NSTableColumn Arrow up/down
- Subject: Re: Set NSTableColumn Arrow up/down
- From: Kevin Hoctor <email@hidden>
- Date: Fri, 2 Mar 2007 10:17:02 -0600
On Mar 2, 2007, at 9:56 AM, Jerry Krinock wrote:
I have no idea how you managed to get two arrows up there. But
since you
asked for the "right way", I will give you my code. I don't know
if it's
"right", but it does work:
I've never had to write as much code as you showed Jerry. If you have
a KVC compliant application, all you have to do is sort the
information in the controller:
NSSortDescriptor *listSort = [[NSSortDescriptor alloc]
initWithKey:@"date" ascending:YES];
[transactionController setSortDescriptors:[NSArray
arrayWithObject:listSort]];
[listSort release];
The visual changes on the NSTableView come for free with this sort of
the data.
Peace,
Kevin Hoctor
email@hidden
No Thirst Software LLC
http://nothirst.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden