• 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: Allan Odgaard <email@hidden>
  • Date: Fri, 19 Mar 2004 21:02:24 +0100

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.


  • Follow-Ups:
    • Re: Cannot get indexOfObject to work
      • From: Bartlomiej Cichosz <email@hidden>
References: 
 >Cannot get indexOfObject to work (From: Bartlomiej Cichosz <email@hidden>)

  • Prev by Date: Re: Cannot get indexOfObject to work
  • Next by Date: detecting long(ish) mouseDown?
  • Previous by thread: Cannot get indexOfObject to work
  • Next by thread: Re: Cannot get indexOfObject to work
  • Index(es):
    • Date
    • Thread