Re: NSTableView: programatically changing sorted column
Re: NSTableView: programatically changing sorted column
- Subject: Re: NSTableView: programatically changing sorted column
- From: Kyle Sluder <email@hidden>
- Date: Mon, 5 Jul 2010 19:02:13 -0700
On Mon, Jul 5, 2010 at 6:50 PM, Graham Cox <email@hidden> wrote:
> Note that I want to do this for good reason: I have two alternative views of some data, a table view and an icon view. The icon view is sorted to match the table view, so I rely on the table's sort descriptors for both views. When I change sorting in the icon view I need the table view to remain in synch, so the most straightforward way seems to be to simply change the highlighted column of the (hidden) table view which triggers an update by notifying that the sort descriptors have changed (except that it doesn't).
Have you tried making a canonical sortDescriptors property on an
appropriate controller (probably a window controller or view
controller) and binding both the table view and icon view's
sortDescriptors to this property? This seems more appropriate than
synchronizing state between views.
--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