Re: Disable sort in a bound tableview with relationships
Re: Disable sort in a bound tableview with relationships
- Subject: Re: Disable sort in a bound tableview with relationships
- From: Todd Ransom <email@hidden>
- Date: Fri, 21 Jul 2006 11:29:45 -0600
For the archives, you can disable sort by subclassing
NSArrayController and overriding sortDescriptors like this:
- (NSArray *)sortDescriptors
{
return [NSArray array];
}
Todd Ransom
Return Self Software
http://returnself.com
On Jul 10, 2006, at 10:24 AM, Todd Ransom wrote:
I have a table view in my application that shows an ordered list of
items. Each item in the list has a to-one relationship with another
item in my document, specified by a popup button in the table.
Because order is important I would like to disable sorting, which
doesn't make sense for this data. To do this I tried changing the
tableview's bindings and leaving out the sortDescriptors bindings
as described by mmalc on his bindings page. I also tried unbinding
the sortDescriptors as described here:
http://www.cocoabuilder.com/archive/message/cocoa/2005/9/6/145803
The problem is every time I disable sorting on this table view the
objects that define to-one relationships are being sent an
isEqualToString: message, which of course throws an exception. I
see this same problem described in the URL above but no solution.
Is this a bug? Is there any workaround that will allow me to
disable sorting on a bound table that uses a popup button to
specify a relationship?
thanks,
Todd Ransom
Return Self Software
http://returnself.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden