• 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
Reading and writing a simple NSDictionary in an NSDocument based app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: How to deal with Resource Forks from command line
  • Next by Date: Re: CoreText Framework?
  • Previous by thread: Re: NSTextView typing speed - slowdown at top?
  • Next by thread: 10.3.9 cross development SDK not working?
  • Index(es):
    • Date
    • Thread