• 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: How to uncheck checkbox in an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to uncheck checkbox in an NSTableView


  • Subject: Re: How to uncheck checkbox in an NSTableView
  • From: Nick Zitzmann <email@hidden>
  • Date: Fri, 25 Dec 2009 09:11:05 -0800

On Dec 23, 2009, at 4:34 PM, Lance Kwan wrote:

> I cannot uncheck the NSbuttonCell inside the tableView. When running the program, i set all the checkbox to NSOnState. meaning they are all check when running my program.
> But when clicking the checkbox it will no t uncheck. Is there a way i could uncheck? because setting the state to NSOffState will not work.

Table view objects get their state from a data source, so trying to modify them outside of the data source methods won't work very well. Did you try modifying the data source? If you're not using bindings, then the data source will get a -tableView:setObjectValue:... message when you change a box's state. You'll also have to return an NSNumber containing the state in your -tableView:objectValueForTableColumn:... method.

Nick Zitzmann
<http://www.chronosnet.com/>



_______________________________________________

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: 
 >Re: How to uncheck checkbox in an NSTableView (From: Lance Kwan <email@hidden>)

  • Prev by Date: Re: MallocDebug Hang with Core Data Save
  • Next by Date: Re: NSCollectionView NSArrayController bindings from outer hell
  • Previous by thread: Re: How to uncheck checkbox in an NSTableView
  • Next by thread: How to use (bind) NSArrayController and NSTableView
  • Index(es):
    • Date
    • Thread