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: Ondra Cada <email@hidden>
- Date: Sun, 28 Oct 2001 10:37:53 +0100
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.
If possible in your setup, I would recommend archiving the dictionary
instead. That works with anything (archivable, but I'm yet to see an
unarchivable object which would be a reasonable key).
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc