• 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: Ken Tozier <email@hidden>
  • Date: Sun, 22 Jul 2007 17:20:14 -0400

On Jul 22, 2007, at 5:13 PM, mmalc crawford wrote:


Why are you comparing string representations?


It was a desperation move because "isEqualToDictionary" always returns false even when the run log printouts of two dictionaries are identical.



<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?


They should. When they are printed to the run log, each dictionary element is identical. NSLog must do something above and beyond what "description" does as the printouts are a byte for byte match when diff'd in BBEdit.


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


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

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