Re: Problems with NSDictionary's writeToFile"atomically: method
Re: Problems with NSDictionary's writeToFile"atomically: method
- Subject: Re: Problems with NSDictionary's writeToFile"atomically: method
- From: Chris Gehlker <email@hidden>
- Date: Sun, 28 Oct 2001 09:45:39 -0700
On 10/28/01 2:37 AM, "Ondra Cada" <email@hidden> wrote:
>
Chris,
>
>
>>>>>> Chris Gehlker (CG) wrote at Sat, 27 Oct 2001 19:03:15 -0700:
>
CG> NSDictionary's writeToFile:atomically: method I working fine for me if
>
CG> the keys are NSStrings but bombing if the keys are NSNumber or NSData
>
CG> objects. As far as I can tell from the docs, anything that can be a key
>
CG> should work.
>
>
Actually, only property lists should work; other hashable objects should not
>
(they would via NSArchiver).
>
>
Nevertheless the writeToFile:atomically: _IS_ limited for ages and -- so far
>
as I know -- TFM do not mention that. For example, as far as I can remember,
>
it never was able to save arrays used as keys.
>
Thanks, Ondra. At least I know I'm not nuts. TFM mentions restrictions on
the VALUES but doesn't say anything about the keys other than they have to
support copying and ordering. I'll take your suggestion and just archive the
dictionary.
--
When I was a boy I was told that anybody could become President. Now I'm
beginning to believe it. -Clarence Darrow, lawyer and author (1857-1938)