mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-02 03:08:22 +00:00
Reverse update value binding when control editing stops, not only when the action fires. This causes tabbing out of a text field to update the binding source. Based on the description of the bindings option NSContinuouslyUpdatesValueBindingOption this is the right thing to do: if NSContinuouslyUpdatesValueBindingOption is on, update on every character; "otherwise the update is made only when the user interface item resigns as the responder."
This commit is contained in:
1 parent
be13a14330
commit
ef9d2d1775
1 file changed
+5
@@ -520,6 +520,11 @@ var CPControlBlackColor = [CPColor blackColor];
|
||||
if([note object] != self)
|
||||
return;
|
||||
|
||||
var theBinding = [CPKeyValueBinding getBinding:CPValueBinding forObject:self];
|
||||
|
||||
if (theBinding)
|
||||
[theBinding reverseSetValueFor:@"objectValue"];
|
||||
|
||||
[[CPNotificationCenter defaultCenter] postNotificationName:CPControlTextDidEndEditingNotification object:self userInfo:[CPDictionary dictionaryWithObject:[note object] forKey:"CPFieldEditor"]];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user