Re: Ordered NSDictionary
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.