• 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
Manual binding questions.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Manual binding questions.


  • Subject: Manual binding questions.
  • From: Jiva DeVoe <email@hidden>
  • Date: Sun, 23 Jan 2005 14:11:55 -0700

I have an NSSlider on a form in IB. I have an outlet for this in my doc header file:

IBOutlet NSSlider *_slider;
IBOutlet MyView *_myView;

I have attached this to my slider in IB. I have another object (a view) which has a double value called "_sliderVal" with appropriate KVC accessors which is also attached to the appropriate IBOutlet in my doc per above.

In my awake from nib, I am calling:

[_myView bind:@"sliderVal" toObject:_slider withKeyPath:@"doubleValue" options:nil];

I get the initial value this is set to when it starts up, but when I subsequently slide the slider up and down, it does NOT update my view.

What am I doing wrong?

If my problem is that I should be setting up my view as an observer of the slider (by calling some version of addObserver)... then what purpose does the above call serve? What does it do? If it doesn't automatically handle observing etc... I'm not sure what purpose it serves.

If this has been covered in a previous discussion on here, (I searched the archives but didn't find it) feel free to beat me over the head - as long as you include a link to the original discussion. ;)


-- Jiva DeVoe jiva at devoesquared.com http://www.devoesquared.com

_______________________________________________
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: Manual binding questions.
      • From: mmalcolm crawford <email@hidden>
    • Re: Manual binding questions.
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: Re: Application without menu: How to get Cmd-C event?
  • Next by Date: Fullscreen windowing and NSMovieView.
  • Previous by thread: Re: Couple of questions about the "SEL" datatype
  • Next by thread: Re: Manual binding questions.
  • Index(es):
    • Date
    • Thread