Re: How to get strings like for all objects

2009-02-22 Thread Clark Cox
On Sun, Feb 22, 2009 at 6:22 AM, Paul Sanders wrote: > Try %p. Not sure if this works in 64 bit code. FYI: %p is part of the C Standard and is guaranteed to work regardless of the size of a pointer. -- Clark S. Cox III clarkc...@gmail.com ___ Cocoa-

Re: How to get strings like for all objects

2009-02-22 Thread Ken Thomases
On Feb 22, 2009, at 9:02 AM, Jean-Daniel Dupas wrote: Le 22 févr. 09 à 15:14, Ken Tozier a écrit : Hi I need to get unique identifiers for all objects I'm passed for use as keys in an NSMutableDictionary. I tried using hash but I don't know if that would really be unique. It seems like th

Re: How to get strings like for all objects

2009-02-22 Thread Paul Sanders
Try %p. Not sure if this works in 64 bit code. - Original Message - From: "Ken Tozier" To: "Cocoa-Dev (Apple)" Sent: Sunday, February 22, 2009 2:14 PM Subject: How to get strings like for all objects Hi I need to get unique identifiers for all objects I'm

Re: How to get strings like for all objects

2009-02-22 Thread Bill Bumgarner
On Feb 22, 2009, at 6:14 AM, Ken Tozier wrote: I need to get unique identifiers for all objects I'm passed for use as keys in an NSMutableDictionary. I tried using hash but I don't know if that would really be unique. It seems like the console printout for classes with no "description" metho

Re: How to get strings like for all objects

2009-02-22 Thread Jean-Daniel Dupas
Le 22 févr. 09 à 15:14, Ken Tozier a écrit : Hi I need to get unique identifiers for all objects I'm passed for use as keys in an NSMutableDictionary. I tried using hash but I don't know if that would really be unique. It seems like the console printout for classes with no "description"

Re: How to get strings like for all objects

2009-02-22 Thread Ken Tozier
%p did the trick, thanks! On Feb 22, 2009, at 9:23 AM, Andrew Farmer wrote: @"%p" will give a string representation of the address. However, if you're targeting 10.5 or later, you should probably consider NSMapTable instead - it implements this functionality for you without the overhead

Re: How to get strings like for all objects

2009-02-22 Thread Andrew Farmer
On 22 Feb 09, at 06:14, Ken Tozier wrote: I need to get unique identifiers for all objects I'm passed for use as keys in an NSMutableDictionary. I tried using hash but I don't know if that would really be unique. It isn't. The only requirement for -[NSObject hash] is that two objects which

How to get strings like for all objects

2009-02-22 Thread Ken Tozier
Hi I need to get unique identifiers for all objects I'm passed for use as keys in an NSMutableDictionary. I tried using hash but I don't know if that would really be unique. It seems like the console printout for classes with no "description" method would be perfect. I know how to get the