Re: copy & isEqual nightmares
Re: copy & isEqual nightmares
- Subject: Re: copy & isEqual nightmares
- From: Ken Thomases <email@hidden>
- Date: Thu, 16 Feb 2012 13:44:28 -0600
On Feb 16, 2012, at 10:47 AM, Quincey Morris wrote:
> On Feb 16, 2012, at 08:30 , Ken Thomases wrote:
>
>> A dictionary is equal to any other dictionary with equal keys and values. That's true for a mutable dictionary, too. Mutating a mutable dictionary will changes which other objects it's equal to.
>
> Really? Well, OK.
>
> I can't find any documentation that says so, just a couple of inconclusive hints.
Well, the documentation for -[NSDictionary isEqualToDictionary:] <https://developer.apple.com/library/ios/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDictionary/isEqualToDictionary:> says:
"Returns a Boolean value that indicates whether the contents of the receiving dictionary are equal to the contents of another given dictionary."
And:
"Two dictionaries have equal contents if they each hold the same number of entries and, for a given key, the corresponding value objects in each dictionary satisfy the isEqual: test."
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden