• 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
Re: Checkbox state inside a function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Checkbox state inside a function
      • From: "António P.F.Almeida" <email@hidden>
References: 
 >Checkbox state inside a function (From: "António P.F.Almeida" <email@hidden>)

  • Prev by Date: Re: ContextualMenu in text
  • Next by Date: Re: need to not shift row in outline view
  • Previous by thread: Checkbox state inside a function
  • Next by thread: Re: Checkbox state inside a function
  • Index(es):
    • Date
    • Thread