FROM : Caleb Strockbine
DATE : Wed Apr 06 23:05:38 2005
On Wednesday, April 06, 2005, at 09:42AM, "Brian O'Brien" <<email_removed>> 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
DATE : Wed Apr 06 23:05:38 2005
On Wednesday, April 06, 2005, at 09:42AM, "Brian O'Brien" <<email_removed>> 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
| Related mails | Author | Date |
|---|---|---|
| Brian O'Brien | Apr 6, 18:19 | |
| Scott Stevenson | Apr 6, 18:23 | |
| Brian O'Brien | Apr 6, 19:01 | |
| Stephan Ruggiero | Apr 6, 19:03 | |
| Shawn Erickson | Apr 6, 19:14 | |
| Ricky Sharp | Apr 6, 19:18 | |
| Brian O'Brien | Apr 6, 19:18 | |
| Dave Rehring | Apr 6, 19:22 | |
| Hamish Allan | Apr 6, 20:00 | |
| Brian O'Brien | Apr 6, 22:45 | |
| Brian O'Brien | Apr 6, 22:55 | |
| Caleb Strockbine | Apr 6, 23:05 |






Cocoa mail archive

