trigger notification for correct key path in _CPObservationProxy

Previously _CPObservationProxy would only trigger notifications for the key path it was created with. For example a notification for department would be forwarded to the controller and observer as a notification on department.name because that was the key path the observation proxy was created for.
This commit is contained in:
Klaas Pieter Annema
2010-11-24 14:21:19 +01:00
parent 34339fbcd9
commit 21c2b8f74a
+2 -2
View File
@@ -324,9 +324,9 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo
- (void)observeValueForKeyPath:(CPString)aKeyPath ofObject:(id)anObject change:(CPDictionary)change context:(id)context
{
if (_notifyObject)
[_object observeValueForKeyPath:_keyPath ofObject:_object change:change context:context];
[_object observeValueForKeyPath:aKeyPath ofObject:_object change:change context:context];
[_observer observeValueForKeyPath:_keyPath ofObject:_object change:change context:context];
[_observer observeValueForKeyPath:aKeyPath ofObject:_object change:change context:context];
}
- (CPString)description