• 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
writeToFile:atomically ... again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

writeToFile:atomically ... again


  • Subject: writeToFile:atomically ... again
  • From: "Nima Talebi" <email@hidden>
  • Date: Mon, 11 Jun 2007 02:00:26 +1000

Hi

This is my second attempt in sending this email, (trying to be complete
meant the email was too large and was bounced).

...
I know this has been uttered over and over again the list, but I haven't
found a solution, or any suggestions that I've not already accounted for
such as permissions and checking types etc. I'll try and be as complete as
possible here.

Problem Method: [NSDictionary writeToFile:atomically:] fails everytime, and
I don't know why.


Test Case: I've pasted the original email here... http://dark-code.bulix.org/f0dcgo-44875?raw


Results/Problem: As you can see, the writeToFile:atomically works perfectly fine for NSArray of NSNumbers and NSStrings, however the resultant NSDictionary fails.


Pre-empted Answered to some Questions:

1. The destination directory (as you have seen) allows for process owner to
read and write to.
2. an NSDictionary of keys vs values of the following permutations have been
tried with the same results...
   NSStrings vs NSString
   NSNumbers vs NSStrings (example in this email)
   NSNumbers vs NSNumbers
   NSStrings vs NSNumbers.
3. The `NULL' in the above outputs are actually NSStrings (ie @"NULL"), not
real `nil's or `NULL's, obviously.
4. I can't use NSArchive because I *need* the results in XML format, and if
I'd rather do it this way.
5. I have read the documentation ...
This method recursively validates that all the contained objects are
property list objects (instances of NSData, NSDate, NSNumber, NSString,
NSArray, or NSDictionary) before writing out the file, and returns NO if all
the objects are not property list objects, since the resultant file would
not be a valid property list.
...and as you can see, all my objects conform to the rules.



I hope I've been as complete as possible in composing this problem, if
anyone can tell me why the method for the NSDictionary fails, I'd appreciate
it very much. Cheers.

Nima
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: writeToFile:atomically ... again
      • From: "stephen joseph butler" <email@hidden>
    • Re: writeToFile:atomically ... again
      • From: Tommy Nordgren <email@hidden>
    • Re: writeToFile:atomically ... again
      • From: m <email@hidden>
  • Prev by Date: Re: NSArrayController and Bindings
  • Next by Date: Re: writeToFile:atomically ... again
  • Previous by thread: Re: NSArrayController and Bindings
  • Next by thread: Re: writeToFile:atomically ... again
  • Index(es):
    • Date
    • Thread