[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSMutableDictionary requires NSCopying?
From: |
Michael Gardner |
Subject: |
NSMutableDictionary requires NSCopying? |
Date: |
Mon, 19 Mar 2007 05:24:40 -0500 |
To use a custom key type with NSMutableDictionary, I defined -hash and
-isEqual: but not -copyWithZone:, since the NSDictionary docs say that
keys are retained rather than copied. But when I try to insert a key
of that type, I get an NSInvalidArgumentException saying that my class
does not recognize -copyWithZone:. If I add that method, the exception
goes away and everything works fine. I've tried this on both the
latest GNUstep release and on trunk. Are the docs just out-of-date?
Also, cross-module links in the GNUstep API docs seem to be broken.
For example, links for NSRect from the GUI API docs point to:
http://www.gnustep.org/Users/fedor/gnustep-Eldorado/System/Library/Documentation/Developer/Base/Reference/TypesAndConstants.html#type$NSRect
which, of course, leads nowhere. This doesn't really affect me now,
but it was rather confusing when I was first looking through the
documentation.
-Michael
- NSMutableDictionary requires NSCopying?,
Michael Gardner <=