Any idea what are the best practices for archiving an NSViewController inside a window for resume (user interface preservation) purposes? I\'ve tried archiving
I haven’t messed with restorable state much (Jonathon Mah did it for DL3) but if I were doing this I’d try deleting those two methods and implement +restorableStateKeyPaths, e.g.:
+ (NSArray *)restorableStateKeyPaths;
{
return @[@“contentViewController.firstInterestingStateProperty”, @“contentViewController.secondInterestingStateProperty”];
}
And just see if the machinery handled it all for me.
+ (NSArray *)restorableStateKeyPaths;
Returns a set of key paths, representing paths of properties that should be persistent. The frameworks will observe these key paths via KVO and automatically persist their values as part of the persistent state, and restore them on relaunch. The values of the key paths should implement keyed archiving. The base implementation returns an empty array.