Re: Sorting a table using multiple sort descriptors while using bindings...
Re: Sorting a table using multiple sort descriptors while using bindings...
- Subject: Re: Sorting a table using multiple sort descriptors while using bindings...
- From: Shawn Erickson <email@hidden>
- Date: Thu, 14 Dec 2006 09:58:19 -0800
On Dec 14, 2006, at 9:48 AM, Shawn Erickson wrote:
On Apr 12, 2006, at 8:46 AM, Shawn Erickson wrote:
On 4/10/06, Shawn Erickson <email@hidden> wrote:
What is the recommended way (I assume one exists that hasn't clicked
in my head) to get a table view to sort using multiple sort
descriptors when the table view is bound to a array controller
(content, selectionIndexes, and sortDescriptors) and using table
column sort prototypes?
Basically I have sort descriptor prototype defined in IB for table
view columns and the table view resorts based on those prototypes
when
you click in the table header... however regardless of which column
sort descriptor prototype is active I always want two sort
descriptors
to be used... first descriptor should be that of the column the user
wants to sort by (header click sorting) and second descriptor should
be a record id that is not exposed by any column in the table view.
So no takers or is my question / issue not well enough described? :)
Well I have come back around to this issue again. Any suggestions?
One way I see to deal with this is to bind sort descriptors of the
table view to a controller of mine (the one that manages the array
that the array controller outlined above uses as it's content) and
then in my controllers "setSortDescriptors" I add in additional
sort descriptors that I always want in the list and then update the
array controller with that modified sort descriptor list.
..or can I set at the table view level (not column) level a set of
sort descriptors that always should be used in addition to the one
from the currently selected sort column?
...or is creating a subclass of NSArrayController that overrides
setSortDescriptors: a better way?
-Shawn
_______________________________________________
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