Re: Problems using -writeToFile:atomically: from a NSMutableArray
Re: Problems using -writeToFile:atomically: from a NSMutableArray
- Subject: Re: Problems using -writeToFile:atomically: from a NSMutableArray
- From: Scott Stevenson <email@hidden>
- Date: Fri, 22 Oct 2004 21:02:03 -0700
On Oct 22, 2004, at 3:59 PM, George Lawrence Storm wrote:
My -saveXMLPanelDidEnd: returnCode:contextInfo: fails on the call to [toDos writeToFile:filePath atomically:YES].
I am attempting to write the file to my desktop so I have write privileges and I appear to be feeding it a good path and to my knowledge a good array.
When I try to save as XML I get the following results:
2004-10-22 15:19:39.124 ToDos[705] 2 items in array
2004-10-22 15:19:39.124 ToDos[705] NSCFDictionary
2004-10-22 15:19:39.124 ToDos[705] NSCFDictionary
2004-10-22 15:19:39.124 ToDos[705] File path:/Users/george/Desktop/test3
2004-10-22 15:19:39.124 ToDos[705] Failed to write
My guess is that your dictionary contains something other than basic Foundation objects. Other than that, it's not clear what's wrong. Try simplifying the application by just making an array with a single dictionary with a single/key value pair at a hardcoded location. If that works, continuing adding stuff back in until you know exactly what condition makes it fail.
Q: What is a NSCFDictionary? I cannot find it on the Apple site or in AppKiDo. I see references to it in the archives but no definition or general documentation on it.
It's the underlying code shared by both NSDictionary and CFDictionary. You don't need to interact with it directly.
- Scott
--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden