• 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
Unable to save file in Document-Based Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unable to save file in Document-Based Application


  • Subject: Unable to save file in Document-Based Application
  • From: cocoa learner <email@hidden>
  • Date: Sun, 5 Apr 2009 18:21:00 +0600

Hi All,
I am new to cocoa and GUI programming.
I wrote a Document-Based Application. Whose code snippet as follows to write
data into a file (this code is taken from
Aaron.Hillegass-Cocoa.Programming.for.Mac.OS.X
book's Chapter 10 ) -

 - (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError

{

NSLog(@"dataOfType : Called");

    NSData *data = [NSKeyedArchiver archivedDataWithRootObject: employees];

if (data == nil)

{

NSLog(@"dataOfType : Failed to write into file");

}

else

{

NSLog(@"dataOfType : Data is written into file");

}

 NSLog(@"dataOfType : Finished");

 return data;

}

But this code piece is not saving the data into file. Does any one have any
clue why it's not able to create file?

Regards
Cocoa.learner
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

  • Prev by Date: Newbie question: Cocoa threads within RubyCocoa
  • Next by Date: Re: Need localization-proof method of transporting dates.
  • Previous by thread: Newbie question: Cocoa threads within RubyCocoa
  • Next by thread: IB 3.1 Panel Has Maximum Size funky - workaround?
  • Index(es):
    • Date
    • Thread