FROM : Kevin Ballard
DATE : Tue Apr 12 21:34:36 2005
I assume you're setting a value for selectedXAxisValue yourself, yes?
There are two potential solutions:
1) Instead of setting it directly, use your setter method. This will
notify the bound object to update itself
2) Use [self willChangeValueForKey:@"selectedXAxisValue"] right
before setting it manually and [self
didChangeValueForKey:@"selectedXAxisValue"] right after setting it.
This has the same effect as solution #1.
On Apr 12, 2005, at 2:34 PM, Michael Lutz wrote:
> in one NIB I have two windows: One main and one Chart window. Those
> two windows are controlled by one 'AppController' class. The Chart
> window has two radio buttons on it, where the selectedValue is
> bound to NSMutableString *selectedXAxisValue. When I show the
> Chart window the first time selectedValue is nil and none of the
> buttons is selected.
> So my question is: When is selectedValue initialized the first time
> and how can I initialize it up-front (so one button is selected)?
--
Kevin Ballard
<email_removed>
http://www.tildesoft.com
http://kevin.sb.org
DATE : Tue Apr 12 21:34:36 2005
I assume you're setting a value for selectedXAxisValue yourself, yes?
There are two potential solutions:
1) Instead of setting it directly, use your setter method. This will
notify the bound object to update itself
2) Use [self willChangeValueForKey:@"selectedXAxisValue"] right
before setting it manually and [self
didChangeValueForKey:@"selectedXAxisValue"] right after setting it.
This has the same effect as solution #1.
On Apr 12, 2005, at 2:34 PM, Michael Lutz wrote:
> in one NIB I have two windows: One main and one Chart window. Those
> two windows are controlled by one 'AppController' class. The Chart
> window has two radio buttons on it, where the selectedValue is
> bound to NSMutableString *selectedXAxisValue. When I show the
> Chart window the first time selectedValue is nil and none of the
> buttons is selected.
> So my question is: When is selectedValue initialized the first time
> and how can I initialize it up-front (so one button is selected)?
--
Kevin Ballard
<email_removed>
http://www.tildesoft.com
http://kevin.sb.org
| Related mails | Author | Date |
|---|---|---|
| Michael Lutz | Apr 12, 20:34 | |
| Kevin Ballard | Apr 12, 21:34 | |
| Michael Lutz | Apr 12, 22:05 | |
| Kevin Ballard | Apr 12, 22:11 | |
| Michael Lutz | Apr 13, 22:21 | |
| Scott Anguish | Apr 13, 23:38 |






Cocoa mail archive

