Re: Slider / Text Field Combo - Text Field Display Errors
Re: Slider / Text Field Combo - Text Field Display Errors
- Subject: Re: Slider / Text Field Combo - Text Field Display Errors
- From: "Sven A. Schmidt" <email@hidden>
- Date: Tue, 15 Jan 2002 11:19:51 +0100
I have a slider/text field combination set up to track and display
actions in each other. When I move the slider about half the time the
text field is blank when I stop sliding. Hitting return or tab will
cause the text field to display. If I drag the slider slowly the text
field will alternate between blank and display. I usually get seven or
eight units of blank, then one correct display, then seven or eight more
blanks, etc.
I've seen the same behavior in my app and worked around this by having
[textField setStringValue: [sender stringValue]]
in the slider action handle ("moveSlider" in your case). Sometimes the
value will still not appear until the mouse button is released. At that
point it always does, though.
HTH,
Sven
The code is below. Any ideas what I'm doing wrong or not doing?
- (void)awakeFromNib {
[sliderControl setDoubleValue:0.0];
[textField setDoubleValue:0.0];
}
- (IBAction)editTextField:(id)sender {
[sliderControl takeDoubleValueFrom:sender];
}
- (IBAction)moveSlider:(id)sender {
[textField takeDoubleValueFrom:sender];
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.