* Source/NSControl.m (-textDidChange:): If there is a binding with

continious update, pass on the changed text.
* Source/GSXibElement.m: Correct the handling of boolean values in attributes.
* Source/GSBindingHelpers.h,
* Source/NSKeyValueBinding.m: Prevent recursion when
reverseSetValue: is used.
* Source/NSTextField.m (-textDidChange:): Remove empty code line.
This commit is contained in:
Fred Kiefer 2021-03-27 21:20:28 +01:00
parent b8b4d7c2f0
commit 0576f2736b
6 changed files with 36 additions and 1 deletions

View file

@ -361,7 +361,9 @@ void GSBindingInvokeAction(NSString *targetKey, NSString *argumentKey,
keyPath = [info objectForKey: NSObservedKeyPathKey];
dest = [info objectForKey: NSObservedObjectKey];
NSDebugLLog(@"NSBinding", @"reverseSetValue: keyPath %@, dest %@ value %@", keyPath, dest, value);
inReverseSet = YES;
[dest setValue: value forKeyPath: keyPath];
inReverseSet = NO;
}
- (void) reverseSetValueFor: (NSString *)binding
@ -378,6 +380,11 @@ void GSBindingInvokeAction(NSString *targetKey, NSString *argumentKey,
NSDictionary *options;
id newValue;
if (inReverseSet)
{
return;
}
if (change != nil)
{
options = [info objectForKey: NSOptionsKey];