Re: How to uncheck checkbox in an NSTableView
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