Checkbox state inside a function
Checkbox state inside a function
- Subject: Checkbox state inside a function
- From: "António P.F.Almeida" <email@hidden>
- Date: Mon, 4 Feb 2008 12:04:09 +0000
I'm new to Cocoa.
I want to use a checkbox to set a value to a variable accordingly its
state .
That checkbox is declared in header file and working fine.
However, if I use it inside a function, the checkbox state is ignored
and the variable value is always assigned as that statement doesn't
exist.
How to solve this ?
Thanks.
António Almeida
That is the code I'm trying in relevant part
#import "Calc.h"
@implementation Calc
- (int)calc {
.....
if([CheckBox state] == 0)
d = d1;
else
d = d1 + 3;
.....
}
- (IBAction)calc:(id)sender {
.....
}
@end
_______________________________________________
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