Reverse bindings support for when tokens are deleted through the close button.

This commit is contained in:
Alexander Ljungberg committed 2010-10-02 19:36:55 -04:00
1 parent 124a63736f
commit b0e3e38791
1 file changed
+5
+5
View File
@@ -208,6 +208,11 @@ var CPTokenFieldTableColumnIdentifier = @"CPTokenFieldTableColumnIdentifier";
[objectValue removeObjectAtIndex:indexOfToken];
[self setObjectValue:objectValue];
var theBinding = [CPKeyValueBinding getBinding:CPValueBinding forObject:self];
if (theBinding)
[theBinding reverseSetValueFor:@"objectValue"];
[self textDidChange:[CPNotification notificationWithName:CPControlTextDidChangeNotification object:self userInfo:nil]];
}