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