I think the problem is that you have created a data object, but not
an archive, which constitutes another layer around the data object.
You need to invoke NSArchiver on the object before you can unarchive
it. Something like this
On Aug 30, 2005, at 2:27 PM, Ian G. Gillespie wrote:
When I create an NSData object from a URL and set the data for a
Core Data entity's attributes I got this error:
+[NSUnarchiver unarchiveObjectWithData:]: extra data discarded
This is my code:
-(void)setImagePath:(NSURL *)path {
NSLog([path className]); //just to check that I am actually
getting a URL (could come from an AppleScript)
NSData *data = [NSData dataWithContentsOfURL:path];
[self setValue:data forKey:@"image"];
}
Dp Does anyone know why this is happening when it is unarchived?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden