diff --git a/AppKit/CPControl.j b/AppKit/CPControl.j index 77614fb7d..a4d48cb8e 100644 --- a/AppKit/CPControl.j +++ b/AppKit/CPControl.j @@ -149,6 +149,18 @@ var CPControlBlackColor = [CPColor blackColor]; return [super _binderClassForBinding:theBinding]; } +/*! + Reverse set the binding iff the CPContinuouslyUpdatesValueBindingOption is set. +*/ +- (void)_continuouslyReverseSetBinding +{ + var binderClass = [[self class] _binderClassForBinding:CPValueBinding], + theBinding = [binderClass getBinding:CPValueBinding forObject:self]; + + if ([theBinding continuouslyUpdatesValue]) + [theBinding reverseSetValueFor:@"objectValue"]; +} + - (void)_reverseSetBinding { var binderClass = [[self class] _binderClassForBinding:CPValueBinding], diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j index a2b6e9755..eee5dfd95 100644 --- a/AppKit/CPTextField.j +++ b/AppKit/CPTextField.j @@ -808,11 +808,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); if ([note object] !== self) return; - var binderClass = [[self class] _binderClassForBinding:CPValueBinding], - theBinding = [binderClass getBinding:CPValueBinding forObject:self]; - - if ([theBinding continuouslyUpdatesValue]) - [self _reverseSetBinding]; + [self _continuouslyReverseSetBinding]; [super textDidChange:note]; }