On Oct 10, 2010, at 3:19 PM, Kyle Sluder wrote:

> On Sun, Oct 10, 2010 at 12:57 PM, Ken Thomases <[email protected]> wrote:
>> A quick test program on Snow Leopard: a) confirms that NSMutableDictionary 
>> sends out change notifications for its keys, but b) does not send out change 
>> notifications for the allValues property.
> 
> A quick test program also confirms that either I stink at writing
> quick test programs or NSDictionary does not send out old/new values
> in the change dictionary.
> 
> http://gist.github.com/619529

Hate to tell you, but you stink at writing quick test programs. ;P

Your invocation of -addObserver:... specified 0 for the options.  You have to 
specify NSKeyValueObservingOptionNew to get the new value and/or 
NSKeyValueObservingOptionOld to get the old value.  I modified your test 
program to specify both and got:

2010-10-10 15:48:39.970 Untitled2[47695:903] root.key1 changed string1 -> 
differentString

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to