• 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: Initial value of on/off buttons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Initial value of on/off buttons


  • Subject: Re: Initial value of on/off buttons
  • From: Yann Disser <email@hidden>
  • Date: Fri, 25 Apr 2008 18:13:16 +0200

I realize that my buttons are generally not affected by the changes I make to the bool-values. Only the other way around.

Can I not bind bools to the value of NSButtons? Or am I missing something else?

Thanks for your help,
Yann


Yann Disser wrote:
I have five textured NSButtons that are set to operate in "On Off" mode. All of them are value-bound to different bools in my application.
Somehow the first button starts in the "On"-state and the others in the off state, no matter which button I bind to which bool. If I remove the bindings, the buttons start in the "On"-state.


Setting the bools in awakeFromNib does not affect the state of the buttons. Clicking the buttons however causes my bools to have the correct values.

What am I doing wrong? How can I at least set the initial state of my buttons? (They are all "On" in IB)

I just noticed that removing the binding from the first button and adding that SAME binding again causes it to behave like the other buttons. I can restore the "On"-behavior by undoing that change. There has to be a bug involved, however the only thing I want is that all buttons start in the "On"-state without needing an outlet in my controller.

I am thankful for suggestions,
Yann
_______________________________________________

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: Initial value of on/off buttons
      • From: "Hamish Allan" <email@hidden>
  • Prev by Date: Re: Weird Problem With CGImage
  • Next by Date: Re: QTMovie grabing while playback
  • Previous by thread: Initial value of on/off buttons
  • Next by thread: Re: Initial value of on/off buttons
  • Index(es):
    • Date
    • Thread