• 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: Need help with Radio Buttons...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help with Radio Buttons...


  • Subject: Re: Need help with Radio Buttons...
  • From: Caleb Strockbine <email@hidden>
  • Date: Wed, 06 Apr 2005 14:05:38 -0700

 On Wednesday, April 06, 2005, at 09:42AM, "Brian O'Brien" <email@hidden> wrote:
>However there are times when I want to know the value of a radio button
>not just when it
>has been clicked.   I have tried to set it up the radio button set as
>an outlet and then
>checking the selectedTag however the variable that I created in my
>class is nul

You'll want to solve the problem with the outlet, of course. But beyond that,
you might consider using some method other than checking the status of the
radio buttons to figure out what the program should do. Checking which radio
button is selected implies that there's some sort of state information stored
there which might be better stored in your app's model class. That could make
life difficult if you ever decide to add an interface to your app other than
the GUI.

In simpler terms, just add some variable to your model class, and use that to
store an appropriate value whenever the user clicks on a radio button. Then,
when you need to know which radio button was last selected, you only have to
read that value.

Caleb Strockbine

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Porting to Win32
  • Next by Date: possible to tab through buttons and other controls?
  • Previous by thread: Re: Need help with Radio Buttons...
  • Next by thread: Hidden NSSlider
  • Index(es):
    • Date
    • Thread