• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Comparing NSDictionary woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comparing NSDictionary woes


  • Subject: Re: Comparing NSDictionary woes
  • From: mmalc crawford <email@hidden>
  • Date: Sun, 22 Jul 2007 14:13:07 -0700


On Jul 22, 2007, at 2:01 PM, Ken Tozier wrote:

I'm trying to compare two dictionaries and am getting [dict1 isEqualToDictionary: dict2] = NO when they are exactly the same. If I NSLog each dictionary cut, paste their descriptions into separate BBEdit files and do a diff, BBEdit says they are identical.

Why are you comparing string representations?

<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDictionary/isEqualToDictionary: >
"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."


Do your objects satisfy that test?

mmalc

_______________________________________________

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


  • Follow-Ups:
    • Re: Comparing NSDictionary woes
      • From: Ken Tozier <email@hidden>
References: 
 >Comparing NSDictionary woes (From: Ken Tozier <email@hidden>)

  • Prev by Date: Comparing NSDictionary woes
  • Next by Date: Re: Comparing NSDictionary woes
  • Previous by thread: Comparing NSDictionary woes
  • Next by thread: Re: Comparing NSDictionary woes
  • Index(es):
    • Date
    • Thread