• 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: Cannot get indexOfObject to work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot get indexOfObject to work


  • Subject: Re: Cannot get indexOfObject to work
  • From: Bartlomiej Cichosz <email@hidden>
  • Date: Fri, 19 Mar 2004 15:25:41 -0500

That fixes the problem. Many thanks!

Bart


On Mar 19, 2004, at 3:02 PM, Allan Odgaard wrote:

On 19. Mar 2004, at 20:16, Bartlomiej Cichosz wrote:

i=[a indexOfObject:@"caption"];
if(i==NSNotFound) {
NSLog(@"Not found");
}
[...]
It appears that isEqual is never called by indexOfObject, which seems
to be contrary to documentation:

Probably it is sending isEqual: to the object you supply as argument and not the objects stored in the array. Since it assumes that [a isEqual:b] == [b isEqual:a], which is not the case in your program.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Cannot get indexOfObject to work (From: Bartlomiej Cichosz <email@hidden>)
 >Re: Cannot get indexOfObject to work (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Internet Movie Data Base Web Service/ XML returning URL
  • Next by Date: Re: Cannot get indexOfObject to work
  • Previous by thread: Re: Cannot get indexOfObject to work
  • Next by thread: Re: Cannot get indexOfObject to work
  • Index(es):
    • Date
    • Thread