Re: Ugly bug in Foundation, beware!
Re: Ugly bug in Foundation, beware!
- Subject: Re: Ugly bug in Foundation, beware!
- From: "Louis C. Sacha" <email@hidden>
- Date: Thu, 3 Jun 2004 17:01:24 -0700
Hello...
Maybe it is _you_ who is trying to make NSDictionary into something
it is not intended to be...
It sounds like what you are looking for is an NSMapTable (which
unfortunately has a C API to access an opaque struct as opposed to a
objective-C class). It shouldn't be too difficult to create your own
class using it as a base, though.
There are a set of Foundation functions that deal with NSMapTables:
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Functions/FoundationFunctions.html#//apple_ref/doc/uid/20000055/BCIHBGID
Hope that's helpful?
Louis
That is actually a (design) bug. Dictionaries have no business
*whatsoever* copying their keys. For example, it makes it
impossible to use a direct NSObject-derived class with inherited
hash/compare: as a key, but that's only the start.
...
Marcel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.