• 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: How to get a NSButton (check box) state
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get a NSButton (check box) state


  • Subject: Re: How to get a NSButton (check box) state
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 8 Jun 2009 18:14:11 -0500

On Jun 8, 2009, at 5:48 PM, Martin Batholdy wrote:

You are right ... there is something wrong with the connection.

What I have done is the following;

IBOutlet NSButton *launchOption;

I have connected this Outlet with the NSButton by ctrl+dragging from the NSObject to the CheckBox in the window.

Then I control+dragged from the NSButton to the NSObject and connected a method to the NSButton / check box (which works fine)...


Is there something fundamentally wrong ...?

One thing which new Cocoa developers often get wrong is they have two objects which they think are the same. Often, they instantiate a controller in code and also instantiate a controller in their nib. They hook up the one in the nib, but that's not the one they are using at runtime.


For example, if you have a controller which is File's Owner for the nib, you should not have an instance of that controller _in_ the nib.

Regards,
Ken

_______________________________________________

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


References: 
 >How to get a NSButton (check box) state (From: Martin Batholdy <email@hidden>)
 >Re: How to get a NSButton (check box) state (From: KK <email@hidden>)
 >Re: How to get a NSButton (check box) state (From: Martin Batholdy <email@hidden>)
 >Re: How to get a NSButton (check box) state (From: Steve Bird <email@hidden>)
 >Re: How to get a NSButton (check box) state (From: Martin Batholdy <email@hidden>)

  • Prev by Date: Re: How to get a NSButton (check box) state
  • Next by Date: Add app to "launch on startup" list via AppleScript
  • Previous by thread: Re: How to get a NSButton (check box) state
  • Next by thread: Re: How to get a NSButton (check box) state
  • Index(es):
    • Date
    • Thread