Re: Checkbox state inside a function
Re: Checkbox state inside a function
- Subject: Re: Checkbox state inside a function
- From: "Kyle Sluder" <email@hidden>
- Date: Mon, 4 Feb 2008 11:08:07 -0500
On Feb 4, 2008 7:04 AM, "António P. F. Almeida"
<email@hidden> wrote:
> I want to use a checkbox to set a value to a variable accordingly its
> state .
Take a look at bindings. It's designed to do precisely what you want.
Barring that, you can use target/action as you seem to be doing.
> That checkbox is declared in header file and working fine.
Just to clarify: you've created an NSButton ivar, tagged it with
IBOutlet, and connected the outlet in IB, correct?
> 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.
This sentence doesn't really make sense.
1) I'm guessing by "function" you mean "instance method" based on the
code you provide.
2) Which variable is assigned what value?
3) Statements can't "not exist". Not really sure what you meant here.
--Kyle Sluder
_______________________________________________
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