RE: Converting object address in array to index in array
RE: Converting object address in array to index in array
- Subject: RE: Converting object address in array to index in array
- From: "Jonathan E. Jackel" <email@hidden>
- Date: Thu, 20 Nov 2003 16:43:17 -0500
I think you've misdiagnosed the problem. If oldRecord isn't in the array,
the return value is NSNotFound, which is a really huge number that one might
confuse with an object address. Do if (temp == NSNotFound) to see if that's
the problem.
indexOfObjectIdenticalTo: is supposed to return an unsigned int, not an
address. If it's returning an address, I don't know what to tell you.
Jonathan
>
-----Original Message-----
>
From: email@hidden
>
[mailto:email@hidden]On Behalf Of Chewtoy
>
Sent: Thursday, November 20, 2003 3:09 PM
>
To: email@hidden
>
Subject: Converting object address in array to index in array
>
>
>
Greetings,
>
>
I'm using | int temp = [dbRecords
>
indexOfObjectIdenticalTo:oldRecord]; | to get the index of the object
>
in the array but it returns it as an object address how would i convert
>
the object address to its index in the array?
>
_______________________________________________
>
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.
_______________________________________________
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.