From 21c2b8f74ace76e1fb0ec53c0b22b86df1bec90c Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Wed, 24 Nov 2010 14:21:19 +0100 Subject: [PATCH] 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. --- AppKit/CPObjectController.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AppKit/CPObjectController.j b/AppKit/CPObjectController.j index 30a720848..b0e4d9b18 100644 --- a/AppKit/CPObjectController.j +++ b/AppKit/CPObjectController.j @@ -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