On Tue, May 18, 2010 at 5:21 PM, Matthew Weinstein <[email protected]> wrote: > My mistake for not being clear: > I have an NSData in an object; > I read that data using a keyedArchiver to get to the chunk I want. > > I want to replace a chunk of that data with another using the same key. (the > file part is immaterial).
You can't do this. NSKeyedArchiver/Unarchiver does not support in-place modification or partial changes. You must read an entire archive, and write out a complete new archive. If you need incremental modifications, you'll need to use some other storage/serialization strategy, such as SQLite or CoreData. Mike _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
