• 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: Problems with NSDictionary's writeToFile"atomically: method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Problems with NSDictionary's writeToFile"atomically: method
      • From: Chris Gehlker <email@hidden>
References: 
 >Problems with NSDictionary's writeToFile"atomically: method (From: Chris Gehlker <email@hidden>)

  • Prev by Date: Re: extending tutorial for timer
  • Next by Date: Re: Rapid development with Project Builder...how?
  • Previous by thread: Problems with NSDictionary's writeToFile"atomically: method
  • Next by thread: Re: Problems with NSDictionary's writeToFile"atomically: method
  • Index(es):
    • Date
    • Thread