Archiving NSError
Archiving NSError
- Subject: Archiving NSError
- From: Vera Tkachenko <email@hidden>
- Date: Sun, 16 Nov 2008 16:41:10 +0200
Hello to mac developers :)
If I don't misunderstand things NSError objects can be archived
because NSError implements NSCoding protocol.
I try to archive it as follows:
NSMutableDictionary * dict = [[NSMutableDictionary alloc] init];
NSError * error = [[NSError alloc] initWithDomain: @"TestDomain"
code: 1 userInfo: nil];
[dict setObject:error forKey:@"Error"];
[dict setObject:@"OperationName" forKey:@"Operation"];
[dict writeToFile:@"/Users/ivira/temp" atomically:YES];
Without placing error into dict it work's ok. What am I doing wrong?
--
With regards, Vera Tkachenko
[ICQ#230923300]
[web http://vera.org.ua]
_______________________________________________
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