Re: copy & isEqual nightmares
Re: copy & isEqual nightmares
- Subject: Re: copy & isEqual nightmares
- From: Gideon King <email@hidden>
- Date: Mon, 13 Feb 2012 12:23:34 +1000
On 13/02/2012, at 11:54 AM, James Maxwell wrote:
> But it does beg the question: is there an easy way to test the **identity** of an object? That is, to NSLog the identity of an object, to see if (and how) it's different to a copy that returns YES to isEqual and has the same hash? I guess I could put something in -description: that would tell me (i.e., include info on the data that I'm NOT comparing in my isEqual method)... Anyway, I was just curious about that.
>
> J.
>
You can
NSLog(@"%p", self);
to print the address of the object.
Gideon
_______________________________________________
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