• 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: NSTreeController and remove:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTreeController and remove:


  • Subject: Re: NSTreeController and remove:
  • From: Joanna Carter <email@hidden>
  • Date: Mon, 17 May 2010 08:30:38 +0100

Hi Tony

> Ok, here is the magical answer as to why the remove: didn't work.  Nice little warning in the Cocoa Bindings Programming topic:
>
> Warning: Providing the count key path to an NSTreeController instance disables the add:,addChild:, remove:, removeChild:, orinsert: methods.
>
> My object implemented a method to retrieve the count and I set it in the controller.    What the warning doesn't mention, it also causes CanAdd and CanRemove to always return no.  So, if anyone is having problems with binding these methods to their buttons and they are disabled, this can also be a reason why.


Thank you for one of those superb little gems that can save so much time. I have filed it away under one of those things to remember before starting to tear my hair out :-)

Joanna

--
Joanna Carter
Carter Consulting

_______________________________________________

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: 
 >NSTreeController and remove: (From: Tony Romano <email@hidden>)
 >Re: NSTreeController and remove: (From: Quincey Morris <email@hidden>)
 >Re: NSTreeController and remove: (From: Tony Romano <email@hidden>)
 >Re: NSTreeController and remove: (From: Mike Abdullah <email@hidden>)
 >Re: NSTreeController and remove: (From: Tony Romano <email@hidden>)

  • Prev by Date: Re: Why I can't see my localized nib?
  • Next by Date: Re: TIPS : Using Add2Project to organize your projects more effectively.
  • Previous by thread: Re: NSTreeController and remove:
  • Next by thread: add small (control size) column to table view
  • Index(es):
    • Date
    • Thread