• 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: NSTableView auto sorting does not work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView auto sorting does not work


  • Subject: Re: NSTableView auto sorting does not work
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 11 Feb 2011 18:45:21 -0800

On Fri, Feb 11, 2011 at 5:14 PM, Chris Tracewell <email@hidden> wrote:
> I have experienced that an NSTableview which is bound to an array controller will sometimes automatically sort when their column headers are clicked and sometimes not. As an example, I currently have two windows, each with a tableview bound to an array controller. One tableview sorts, the other does not. For both tableviews each column is bound to the arranged objects of its respective array controller and has "Creates Sort Descriptor" selected in IB.Yes, I could use delegates and implement my own sort descriptors but getting free sorting is really nice and it works for some of my tableviews, so I'd like to find out what breaks this functionality.

Did you actually bind the table view's sortDescriptors binding to the
array controller's sortDescriptors property?

In the simplest case (all columns bound to different keys on the same
NSArrayController), NSTableView will automagically bind its
selectedIndexes and its sortDescriptors bindings to the relevant
properties on the array controller. But if your columns aren't all
bound to the same array controller, the table view can't logically do
this, so you are responsible for binding these yourself.

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: NSTableView auto sorting does not work
      • From: Chris Tracewell <email@hidden>
    • Re: NSTableView auto sorting does not work
      • From: Chris Tracewell <email@hidden>
References: 
 >NSTableView auto sorting does not work (From: Chris Tracewell <email@hidden>)

  • Prev by Date: NSTableView auto sorting does not work
  • Next by Date: Looking for suggestions/help on a multi-file data model
  • Previous by thread: NSTableView auto sorting does not work
  • Next by thread: Re: NSTableView auto sorting does not work
  • Index(es):
    • Date
    • Thread