• 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: When are bound variables initialized?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When are bound variables initialized?


  • Subject: Re: When are bound variables initialized?
  • From: Kevin Ballard <email@hidden>
  • Date: Tue, 12 Apr 2005 15:34:36 -0400

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@hidden http://www.tildesoft.com http://kevin.sb.org

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: When are bound variables initialized?
      • From: Michael Lutz <email@hidden>
References: 
 >When are bound variables initialized? (From: Michael Lutz <email@hidden>)

  • Prev by Date: Re: debugger woes
  • Next by Date: Creating custom VerticalRuler for NSScrollBar
  • Previous by thread: When are bound variables initialized?
  • Next by thread: Re: When are bound variables initialized?
  • Index(es):
    • Date
    • Thread