• 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
[SOLVED] Responding to changes in outline view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] Responding to changes in outline view


  • Subject: [SOLVED] Responding to changes in outline view
  • From: Rick Mann <email@hidden>
  • Date: Tue, 11 Jan 2011 19:34:05 -0800

I needed to observe selectionIndexPaths, not selectionIndexes. I only discovered this by adding the NSKeyValueObservingOptionInitial (would've been nice if the act of observing would check to see if the key exists).

--
Rick

On Jan 11, 2011, at 17:33:29, Rick Mann wrote:

> Sorry, forgot to add something (that my tree controller binds to Core Data).
>
> -----
>
> I found two examples so far (one using notifications, one KVO) for responding to changes in a table view's selection.
>
> I tried the KVO approach in the sample code NSTabelViewBinding. It sets up KVO on the array controller:
>
> 	[myContentArray addObserver: self
> 					forKeyPath: @"selectionIndexes"
> 					options: NSKeyValueObservingOptionNew
> 					context: NULL];
>
>
> I tried to do the same on my NSTreeController, but I'm not getting called. What do I need to do?
>
> My tree controller binds to Core Data.
>
> TIA,
> Rick
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please 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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: 
 >Resent: Responding to changes in outline view (From: Rick Mann <email@hidden>)

  • Prev by Date: Right way to change default app launch behavior?
  • Next by Date: Re: Right way to change default app launch behavior?
  • Previous by thread: Resent: Responding to changes in outline view
  • Next by thread: Right way to change default app launch behavior?
  • Index(es):
    • Date
    • Thread