Re: How to get strings like <CSSDictionary: 0x126a70> for all objects
Re: How to get strings like <CSSDictionary: 0x126a70> for all objects
- Subject: Re: How to get strings like <CSSDictionary: 0x126a70> for all objects
- From: Bill Bumgarner <email@hidden>
- Date: Sun, 22 Feb 2009 09:06:32 -0800
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" method would be perfect.
I know how to get the class but how to get the object address in
hex? Here's a partial solution
[NSString stringWithFormat: @"<%@ %???>", [[someObject class]
description], someObject];
Is there a format code that would give me the address in hex?
Could you use an NSMapTable instead?
Specifically, something like:
... [NSMapTable mapTableWithKeyOptions:
NSPointerFunctionsObjectPointerPersonality valueOptions:
NSPointerFunctionsObjectPersonality] ...
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden