• 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: isEqualToArray: returning NO for equal arrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isEqualToArray: returning NO for equal arrays


  • Subject: Re: isEqualToArray: returning NO for equal arrays
  • From: Rosyna <email@hidden>
  • Date: Thu, 2 Nov 2006 18:38:01 -0700

With someone's help and more looking into it, it seems isEqualToArray: fails because isEqual: fails if comparing an immutable and mutable dictionary. If both NSDictionarys are immutable, then isEqual: succeeds. I have *no* idea why isEqual: fails if the mutability is different, but the contents are identical.

Ack, at 11/3/06, Marc Wan said:

NSArray isEqualToArray compares two arrays to see if the values are the same by using the isEqual method. I'm not 100% sure here how deep/rich the Foundation Framework is, but I would suspect that the problem is that the NSDictionary isEqual method only returns TRUE/YES if they're actually the same object (which is why they implemented the isEqualToDictionaryMethod). Somewhere there, a method is comparing object pointers and not the underlying values.

--


Sincerely, Rosyna Keller Technical Support/Carbon troll/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: isEqualToArray: returning NO for equal arrays (From: "Marc Wan" <email@hidden>)

  • Prev by Date: Re: isEqualToArray: returning NO for equal arrays
  • Next by Date: Re: Re: Open my Application via safari
  • Previous by thread: Re: isEqualToArray: returning NO for equal arrays
  • Next by thread: special things... NSTabView
  • Index(es):
    • Date
    • Thread