• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Checkbox state inside a function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Checkbox state inside a function
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Once again: Clickable hyperlink in NSTableView
  • Next by Date: Re: Once again: Clickable hyperlink in NSTableView
  • Previous by thread: Re: Once again: Clickable hyperlink in NSTableView
  • Next by thread: Re: Checkbox state inside a function
  • Index(es):
    • Date
    • Thread