• 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 to number of selected rows in a table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binding to number of selected rows in a table


  • Subject: Re: binding to number of selected rows in a table
  • From: "Sean McBride" <email@hidden>
  • Date: Wed, 4 Mar 2009 10:14:11 -0500
  • Organization: Rogue Research Inc.

On 3/3/09 6:38 PM, James Walker said:

>I want to use bindings to set certain control attributes (enabled state,
>tool tip) depending on the number of selected rows in an outline table.
>  I have a controller object that owns an NSOutlineView, and I gave it
>an accessor
>
>- (NSOutlineView*) outlineView;
>
>Then I tried to bind to my controller with key paths like
>outlineView.numberOfSelectedRows and outlineView.selectedRowIndexes, and
>using value transformers.  It looks like the bindings are setting the
>attributes appropriately once, but then not updating when the selection
>changes.  Are these NSOutlineView methods not KVO-friendly, or am I
>doing something wrong?

Are you using NSTreeController?  If so, you can bind to
selectionIndexPaths and use @count also.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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: 
 >binding to number of selected rows in a table (From: James Walker <email@hidden>)

  • Prev by Date: Re: Moving oneself to /Applications (or ~/Applications)
  • Next by Date: [Q] Responder Chain & makeFirstResponder
  • Previous by thread: Re: binding to number of selected rows in a table [solved]
  • Next by thread: Re: binding to number of selected rows in a table
  • Index(es):
    • Date
    • Thread