Re: Cannot get indexOfObject to work
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.