On Dec 23, 2009, at 02:05, Lance Kwan wrote:

> I have troubles on unchecking a  checkbox in a table view.

What troubles? We can't help if we don't know.

>             if([buttonCell state] == 1)

Why are you using 0 and 1 for your 'if' tests, instead of NSOffState and 
NSOnState?

>             {           
>                        NSLog(@"checkbox is check. Need to uncheck 1");
>                        NSLog(@"current state %d",[buttonCell state]); 
>                    [buttonCell setState:NSOffState]; 
>                        [buttonCell setNextState]; 

This code turns the checkbox off (setState:NSOffState) and then turns it back 
on again (setNextState). Seems like a bug.

>                        NSLog(@"new state %d",[buttonCell state]);
> 
>             }           

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to