• 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
How to get strings like <CSSDictionary: 0x126a70> for all objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get strings like <CSSDictionary: 0x126a70> for all objects


  • Subject: How to get strings like <CSSDictionary: 0x126a70> for all objects
  • From: Ken Tozier <email@hidden>
  • Date: Sun, 22 Feb 2009 09:14:05 -0500

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 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?

Thanks for any help
_______________________________________________

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


  • Follow-Ups:
    • Re: How to get strings like <CSSDictionary: 0x126a70> for all objects
      • From: "Paul Sanders" <email@hidden>
    • Re: How to get strings like <CSSDictionary: 0x126a70> for all objects
      • From: Bill Bumgarner <email@hidden>
    • Re: How to get strings like <CSSDictionary: 0x126a70> for all objects
      • From: Jean-Daniel Dupas <email@hidden>
    • Re: How to get strings like <CSSDictionary: 0x126a70> for all objects
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: Re: Application Activation
  • Next by Date: Re: How to get strings like <CSSDictionary: 0x126a70> for all objects
  • Previous by thread: Re: Application Activation
  • Next by thread: Re: How to get strings like <CSSDictionary: 0x126a70> for all objects
  • Index(es):
    • Date
    • Thread