• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Binding NSTreeController to NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Binding NSTreeController to NSArray (From: Caleb Cannon <email@hidden>)

  • Prev by Date: Re: Accessing @private superclass ivars
  • Next by Date: Re: Accessing @private superclass ivars
  • Previous by thread: Binding NSTreeController to NSArray
  • Next by thread: How to get a NSPopUpButtonCell bound to a CoreData attribute?
  • Index(es):
    • Date
    • Thread