Re: Sorting NSTableView on two keys
Re: Sorting NSTableView on two keys
- Subject: Re: Sorting NSTableView on two keys
- From: Trygve Inda <email@hidden>
- Date: Fri, 01 Dec 2006 19:51:39 +0000
- Thread-topic: Sorting NSTableView on two keys
> Use bindings to link your table columns to your array controller, via the
> accesors firstName and lastName. The controller will take care of the rest
> for you. It will sort by the previously sorted column when the compare turns
> out to be NSOrderedSame. It does this for more than two columns as well in
> case the first and last name turns out to be the same. That is all you
> really need to do, but if you want to peek at the inside of the array
> controller so that you can verify that it's working you can do so with
> NSArrayController method (sortDescriptors:)
>
> Conor Dearden
> http://www.bruji.com/
This does not work... As least in this case.
I have a table bound to an array controller. 3 columns (checkbox, firstname,
lastname)
If I check a few boxes, then uncheck one box, then click the lastname header
and finally click the checkbox header I get all the checked boxed at the top
of the list (good), but the first unchecked box is the box that used to be
checked... Regardless of the ordering of the last name field.
I need to be able to sort by checked boxes so all checked boxes are first,
then by lastname, firstname.
Possible?
Trygve
_______________________________________________
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