Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sergio10

macrumors regular
Original poster
Oct 3, 2007
137
0
Hi I have next event which binds to check box:
Code:
- (IBAction)clickCheckBox:(id)sender
{
	if([sender isSelected] == YES)
	{
		[position setStringValue: @"isSelected"];
		_isChecked = YES;
	}
	else
	{
		[position setStringValue: @"notSelected"];
		_isChecked = NO;
	}
}
On debug, this code is hangs(at first line). Why? How to verify checkbox control it is checked?

Thanks,
Sergio
 
isSelected is not a method that NSButton knows. Use state:
Code:
if ([sender state] == NSOnState)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.