• 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
Re: Ugly bug in Foundation, beware!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Ugly bug in Foundation, beware! (From: Ondra Cada <email@hidden>)
 >Re: Ugly bug in Foundation, beware! (From: Marco Scheurer <email@hidden>)
 >Re: Ugly bug in Foundation, beware! (From: Ondra Cada <email@hidden>)
 >Re: Ugly bug in Foundation, beware! (From: Marcel Weiher <email@hidden>)

  • Prev by Date: Forum notify
  • Next by Date: Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
  • Previous by thread: Re: Ugly bug in Foundation, beware!
  • Next by thread: Re: Ugly bug in Foundation, beware!
  • Index(es):
    • Date
    • Thread