Manual binding questions.
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