On Feb 10, 2010, at 10:40 AM, Jason Bobier wrote:

> In theory, the archived navcontroller should contain my complex view 
> controller hierarchy and all of the related views, so this should work.
> However, when I unarchive and add to view to the window, the subviews rarely 
> have all of their values set correctly despite being supposedly NSCoding 
> compliant. (For example, I have a button that fails to have it's target and 
> action set)

There's more to nib loading than just unarchiving views. I don't think this is 
unlikely to work.

I don't think it should be necessary, either: it's a violation of MVC. The 
persistent data is the model; that's what you want to save. The views are 
configured at runtime to reflect the state of the model.

One practical problem with your approach would be if you ever change the design 
of your view hierarchy in a future release. Now you have a complex 
schema-migration problem when existing users launch the new version of the app 
and load an obsolete view hierarchy.

—Jens_______________________________________________

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