Hello, What version of Monobjc are you using ? A lot of constants have been fixed in the latest version (2.0.313), and NSKeyValueObserving is part of the fixes. Tell me if you still have the issue with the 2.0.313.
Note that the bug tracking system can be accessed at http://tracker.monobjc.net and required a registration. Regards, Laurent Etiemble. 2009/2/4 Joanna Carter <[email protected]>: > Hi folks > > I just wanted to confirm a possible bug in the NSKeyValueObserving class. > > Using Reflector to check the initialisation of this class, I see the > following : > > static NSKeyValueObserving() > { > NSKeyValueChangeKindKey = > NSString.NSPinnedString("NSKeyValueChangeKindKey"); > NSKeyValueChangeNewKey = NSString.NSPinnedString("NSKeyValueChangeNewKey"); > NSKeyValueChangeOldKey = NSString.NSPinnedString("NSKeyValueChangeOldKey"); > NSKeyValueChangeIndexesKey = > NSString.NSPinnedString("NSKeyValueChangeIndexesKey"); > } > > Unfortunately, in a test OS X app that implements KVO, I have the following > method to respond as observer to a property change : > > void observeValueForKeyPathOfObjectChangeContext(NSString keyPath, NSObject > obj, NSDictionary change, Object context) > { > NSString keyStr = NSKeyValueObserving.NSKeyValueChangeNewKey; > > Id valueId = change[keyStr]; > > ... > } > > This doesn't work, as the key, which equates to "NSKeyValueChangeNewKey", is > not found in the change NSDictionary. > > However, If I do this : > > void observeValueForKeyPathOfObjectChangeContext(NSString keyPath, NSObject > obj, NSDictionary change, Object context) > { > NSString keyStr = "new"; > > Id valueId = change[keyStr]; > > ... > } > > I get the expected result of the value for the "new" key. > > Is this meant to be like this? If so, how would I get things to work? If > not, how do I get this submitted to the bug system? > > Joanna > > -- > Joanna Carter > Carter Consulting > >

