[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Deserializaton order
From: |
Frederico Muñoz |
Subject: |
Re: Deserializaton order |
Date: |
Wed, 06 Apr 2005 10:55:36 +0200 |
Hi,
On 2005-04-04 08:37:57 +0100 Frederic Stark <address@hidden> wrote:
> Frederico Muñoz wrote:
>
>> The problem I'm having is that when I deserialize the data into a
>> NSDictionary to perform the copy operations that
>> filenames appear in random order,
>
> NSDictionary's keys are not oredered. You should order them yourself.
(...)
>
> NSEnumerator *e = [[[theDict allKeys]
> sortedArrayUsingSelector:@selector(compare:)]
> objectEnumerator];
> NSString *thePath;
>
> while ((thePath = [e nextObject]))
> // Do something with [theDict objectForKey:thePath];
Thanks, I stumbled upon this methods while searching for a solution, and your
mail made me understand the usage better. It doesn't apply to my situation,
since the order is not alphabetic, but it was good info nonetheless.
Best regards,
fsmunoz
--
Frederico Muñoz