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

Re: NSDictionary Unordered


  • Subject: Re: NSDictionary Unordered
  • From: email@hidden
  • Date: Sat, 20 Jul 2002 19:54:36 +0200

On samedi, juillet 20, 2002, at 06:02 PM, email@hidden wrote:

Currently, when a dictionary is enumerated, it seems to enumerate in no particular order. I need the order to be as the entries were put in (FIFO). How can a dictionary be enumerated in order?

The stupid answer, which might be the official answer too, is that if you care about the order, then you should use a NSArray somewhere.

One solution could be to have a NSMutableArray in which you append the keys when you add a key-object couple then you iterate through this array to get the keys in the order you want.
_______________________________________________
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: 
 >NSDictionary Unordered (From: email@hidden)

  • Prev by Date: Re: [Q] How do I find out where a variable's type is getting changed?
  • Next by Date: renaming MyDocument
  • Previous by thread: NSDictionary Unordered
  • Next by thread: Re: Crashing Subclass [Problem]
  • Index(es):
    • Date
    • Thread