• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sorting NSTableView on two keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: NSMailDelivery & Apple Help
  • Next by Date: Re: NSImage TIFFRepresentation memory leak
  • Previous by thread: Re: [Moderator] EOT (Re: OT: The "Apple way" of doing things)
  • Next by thread: drawing text onto an NSImage
  • Index(es):
    • Date
    • Thread