• 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: trouble keeping NSTableView sorted
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trouble keeping NSTableView sorted


  • Subject: Re: trouble keeping NSTableView sorted
  • From: Keary Suska <email@hidden>
  • Date: Sun, 09 Dec 2007 11:15:41 -0700
  • Thread-topic: trouble keeping NSTableView sorted

on 12/7/07 1:11 PM, email@hidden purportedly said:

>> If you mean that you want a set sort order that the user can't
>> change, then
>> bind the tablevew's selectionIndexes to the array controller. This
>> will
>> disable column header sorting.
>
> Untrue: by nib awakening the table will be sorted according to the bound
> sort descriptors array but the user can still click on a column header
> to sort
> the array differently.
>
> If you want this to be disabled you¹ve got to uncheck the Create sort
> descriptors
> binding option for each column value binding.

No, it *is* true. Try it, and you will see that you are completely wrong
about this point. At least for Tiger and lower, but I would expect it to
work the same on Leopard. I did forget to mention a step: you have to bind
both "content" and "selectionIndexes" to the array controller. This way you
override the implicit bindings set when you bind the table column value. So,
unless you bind sortdescriptors, the tableview won't effect sorting.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

References: 
 >Re: trouble keeping NSTableView sorted (From: Wdyp <email@hidden>)

  • Prev by Date: Re: Writing GNU-Step compatible Cocoa
  • Next by Date: Re: IB 3 z-order problem
  • Previous by thread: Re: trouble keeping NSTableView sorted
  • Next by thread: Strange bindings error
  • Index(es):
    • Date
    • Thread