Reading and writing a simple NSDictionary in an NSDocument based app
Reading and writing a simple NSDictionary in an NSDocument based app
- Subject: Reading and writing a simple NSDictionary in an NSDocument based app
- From: Dario Mèndez Musicò <email@hidden>
- Date: Wed, 28 Sep 2005 22:42:10 +0200
I've ran into a weird problem when trying to develop an NSDocument-
based app...
Basically I want it to load and save data as a regular property list,
so i set up these writeToFile: and readFromFile: methods.
- (BOOL)writeToFile:(NSString *)fileName ofType:(NSString *)type;{
NSLog(fullDocumentPath);
return [review writeToFile: fileName atomically: YES];
}
- (BOOL)readFromFile:(NSString *)fileName ofType:(NSString *)docType
{
[review release];
review = nil;
if (review = [NSMutableDictionary dictionaryWithContentsOfFile:
fileName])
return YES;
else
return NO;
}
However, when I try to save my document it just says it was unable to
save it, and I also noticed that the path of the file I've NSLogged is
/private/var/tmp/folders.501/TemporaryItems/
com.apple.myCocoaDocumentApp_2422_149632116_1/Untitled.dgr
What am I doing wrong..?
Thanks in advance
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
_______________________________________________
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