Re: radio Button newbie question
Re: radio Button newbie question
- Subject: Re: radio Button newbie question
- From: Bill Mutch <email@hidden>
- Date: Sun, 27 Apr 2008 10:29:45 -0400
Alli,
I was having problems with my radio group as well. Everything seemed
to be coded correctly but when I referenced the radio button it was
never set. The matrix 1 row by 2 columns (2 radio buttons).
my code was:
IBOutlet NSMatrix *IB_timeInterval;
I set method IBA_intervalChanged as the action for the matrix in
Interface Builder
- (IBAction)IBA_intervalChanged:(id)sender{
NSLog(@"Controller.m IBA_intervalChanged, column: %i, row: %i",
[IB_timeInterval selectedColumn], [IB_timeInterval selectedRow]);
if ( [IB_timeInterval selectedColumn] == 1 ) {
timeInterval = (NSTimeInterval)6.0;
} else {
timeInterval = (NSTimeInterval)0.5;
}
}
The selected column was always 0, even when the 2nd button (column 1)
was selected.
As it turns out, I forgot to make the connection (cntl drag) from my
window controller to the matrix. So it appeared that I was referencing
IB_timeInterval but I wasn't. This worked after I fixed the connection.
Bill
_______________________________________________
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