• 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: Ordered NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ordered NSDictionary


  • Subject: Re: Ordered NSDictionary
  • From: Gregory Weston <email@hidden>
  • Date: Fri, 11 Jun 2004 07:16:45 -0400

On Jun 11, 2004, at 12:12 AM, Sam McCandlish wrote:

Does anyone know of a way to make NSDictionary keeps the objects'
order? I may want to use it to store a configuration file, but in this
configuration file order matters.

Maintaining an arbitrary ordered is contrary to the notion of a dictionary. It will generally maintain its own ordering to optimize access. Probably your best bet is to maintain, possibly as one of the dictionary's entries, an NSArray which holds all the (other) dictionary keys in the order your care about them.
_______________________________________________
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.


  • Prev by Date: Re: Catching all keyDowns and mouseDowns in application
  • Next by Date: Compile problem with xcode
  • Previous by thread: Re: Ordered NSDictionary
  • Next by thread: Menu Mystery
  • Index(es):
    • Date
    • Thread