Re: Table view active sorting and filter as model changes...
Re: Table view active sorting and filter as model changes...
- Subject: Re: Table view active sorting and filter as model changes...
- From: mmalc Crawford <email@hidden>
- Date: Wed, 23 May 2007 14:18:06 -0700
On May 23, 2007, at 2:03 PM, Shawn Erickson wrote:
...or as you state I could iterate over all participants and observe
the key(s) that are currently in the active sort descriptor.
That's not *quite* what I was saying...
(The hint was supposed to be that the array controller already
observes all the elements.)
Thinking a little more about it... subclassing NSArrayController may
be the better way to go.
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
change:(NSDictionary *)change context:(void *)context
{
[super observeValueForKeyPath:keyPath ofObject:object change:change
context:context];
if ([keyPath isEqualToString:FilterOrSortKey])
{
[self rearrangeObjects];
}
}
mmalc
_______________________________________________
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