• 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: Converting object address in array to index in array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Converting object address in array to index in array (From: Chewtoy <email@hidden>)

  • Prev by Date: Re: I can't figure out how to use NSIndexSet
  • Next by Date: Limit NSTextField Size of Input
  • Previous by thread: Converting object address in array to index in array
  • Next by thread: Limit NSTextField Size of Input
  • Index(es):
    • Date
    • Thread