Re: Binding NSTreeController to NSArray
Re: Binding NSTreeController to NSArray
- Subject: Re: Binding NSTreeController to NSArray
- From: John Harte <email@hidden>
- Date: Mon, 19 Feb 2007 18:14:58 -0500
On Feb 16, 2007, at 6:58 AM, Caleb Cannon wrote:
I'm binding the outline column of an NSOutlineView to an
NSTreeController. The tree controller is in turn bound to an
NSArray that I create using a fetch request.
What is the proper way to inform the tree controller that the
contentArray has been updated? I've tried using
[self willChangeValueForKey:@"filteredTitles"];
[self willDidChangeValueForKey:@"filteredTitles"];
in succession but it seems that the object count is not being
updated along with with content:
Caleb,
When changing an NSArray use willChange:valuesAtIndexes:forKey:
described here:
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueObserving_Protocol/index.html
>
John
_______________________________________________
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