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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to