Initializing Radio buttons in an NSMatrix problem
Initializing Radio buttons in an NSMatrix problem
- Subject: Initializing Radio buttons in an NSMatrix problem
- From: John James <email@hidden>
- Date: Mon, 01 Aug 2011 08:47:23 -0400
Using Lion: I have a NSMatrix 1 row 3 cols.
at Startup I can not get the first radio button to show an indication; works fine if user clicks on any one.
Relavent code (called from awakeFromNib):
(framesPersec is an outlet for the NSMatrix with tags 1,2,3 respectively)
- (void) initFramespersec
{
if (framesPersec!=NULL) {
[framesPersec setAllowsEmptySelection: NO];
indexSelectedItem = 2; <========================== I change this to 1 or 2
if (indexSelectedItem==1)
[self setMyFramesPerSec: 24];
else if (indexSelectedItem==2)
[self setMyFramesPerSec: 29.97];
else
[ self setMyFramesPerSec: 30];
secPerFrame = 1./myFramesPerSec;
[self updateInterBeatNumbers];
NSCell* mycell = [framesPersec cellWithTag: indexSelectedItem];
[mycell setState:NSOnState];
}
}
If indexSelectedItem == 1
If indexSelectedItem == 2
Any feedback would be appreciated
John_______________________________________________
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