Re: NSArrayController / NSTableView questions
Re: NSArrayController / NSTableView questions
- Subject: Re: NSArrayController / NSTableView questions
- From: Paul Forgey <email@hidden>
- Date: Tue, 6 Sep 2005 01:22:15 -0700
Sorry to keep replying to myself. I'm finally starting to understand
this whole thing.
[tableView unbind:@"sortDescriptors"] in my custom array controller's
awakeFromNib (after [super awakeFromNib]) did the trick.
Further, I implemented arrangeObjects: using my own private sort
descriptor (since I explicitly need these contents in a strict
order). If I instead set the sort descriptor to be what my version
of arrangeObjects: would do, the nature of KVO seems to hook the sort
descriptors back up to the table view and again allows sorting on any
of the columns.
I'm now overriding insertObject:atArrangedObjectIndex: to take care
of the other half.
I know this is an unusual situation. Normally it makes sense to
allow the flexibility and let the arbitrary sort features do their
job. Maybe a worthwhile enhancement to Cocoa would be some sort of
relationship option and corresponding controller introduced to
provide an ordered collection.
On Sep 5, 2005, at 5:43 PM, Paul Forgey wrote:
I also reproduced this with the ToDo sample application. Using
this method to disable sorting in a table view is extremely non-
obvious. Is there an easier way to do this?
On Sep 5, 2005, at 3:16 PM, Paul Forgey wrote:
In the section about how to disable all sorting in an NSTableView
by manually binding the table view's content and selectionIndex,
for some reason this breaks my table column using an
NSPopupButtonCell. The contents of the popup are now apparently
the description: method strings of the to-one entities rather than
the contentValues binding for the column. I get this output:
-[NSManagedObject isEqualToString:]: selector not recognized [self
= 0x351020]
_______________________________________________
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