Re: Using NSKeyedArchiver to save and restore state on iPhone apps
Re: Using NSKeyedArchiver to save and restore state on iPhone apps
- Subject: Re: Using NSKeyedArchiver to save and restore state on iPhone apps
- From: Chris Hanson <email@hidden>
- Date: Wed, 10 Feb 2010 19:57:19 -0800
On Feb 10, 2010, at 4:38 PM, Jason Bobier wrote:
> This idea came about because I was annoyed at having to do it again and realized that everything that I wanted to store was NSCoding compliant, which means that it should be archivable. It appears that some of the NSCoding compliant objects aren't completely restorable tho. :-/
User interface objects support NSCoding in order to be archived in nib files. It’s not sufficient, however, to establish all of the outlet, action (and for Cocoa, binding) connections in a nib file, nor to invoke -awakeFromNib. There may also be some classes that don’t support NSCoding at all that can be referenced by a nib file, such as Cocoa’s NSWindow class.
That’s why you don’t load nib files using NSKeyedUnarchiver, but instead by using one of the methods on NSBundle (or for Cocoa, NSNib).
— Chris
_______________________________________________
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