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

Re: Responding to changes in outline view


  • Subject: Re: Responding to changes in outline view
  • From: Corbin Dunn <email@hidden>
  • Date: Wed, 12 Jan 2011 11:01:23 -0800

On Jan 11, 2011, at 5:32 PM, Rick Mann wrote:

> i found two examples so far (one using notifications, one KVO) for responding to changes in a table view's selection.

There is one way:

- (void)tableViewSelectionDidChange:(NSNotification *)notification;

Implement it on your delegate.


>
> 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];
>
>

If you are using bindings, then that isn't finding out when the table's selection changes; it is finding out when the content array's selection changes. Generally, they are synced, that is why that it appears to work.


> I tried to do the same on my NSTreeController, but I'm not getting called. What do I need to do?

NSTableView doesn't use NSTreeController.

corbin

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

  • Prev by Date: Re: NSOutlineView and selection
  • Next by Date: Re: Custom View with Interface Builder Bindings
  • Previous by thread: Responding to changes in outline view
  • Next by thread: Resent: Responding to changes in outline view
  • Index(es):
    • Date
    • Thread