New: CPTextField now supports the CPEditorRegistrationProtocol (#2169)

This commit is contained in:
daboe01
2020-03-11 10:30:00 +01:00
committed by GitHub
parent 8003d91c4a
commit 5bb338d6ec
4 changed files with 92 additions and 0 deletions
+19
View File
@@ -609,6 +609,25 @@
return YES;
}
- (void)_selectionWillChange
{
// Push back all data from the dirty editors before it is too late.
var editorsCount = [_editors count];
while (editorsCount--)
{
var allBindings = [CPBinder allBindingsForObject:_editors[editorsCount]],
allKeys = [allBindings allKeys],
keysCount = allKeys.length;
while (keysCount--)
[[allBindings objectForKey:allKeys[keysCount]] reverseSetValueFor:allKeys[keysCount]];
}
[super _selectionWillChange];
}
/*!
Returns an array of the selected objects.