Re: objectForKey:self
Re: objectForKey:self
- Subject: Re: objectForKey:self
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 26 Jun 2006 09:39:39 -0600
On Jun 26, 2006, at 6:05 AM, Jonathan del Strother wrote:
The instance variables are then looked up by using the instance
pointer as the key. Here's the strange part - I was using
objectForKey:self, and it worked fine on my Powerbook, but seemed
to break everywhere else. Replacing that with objectForKey:
[NSNumber numberWithInt:self] seems to work fine, regardless of
the environment.
Can anyone explain why objectForKey:self works in some places but
not others?
Does the "self" class support NSCopying? You can't use objects as
keys in dictionaries if the objects don't support NSCopying.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden