On Feb 16, 2017, at 12:43 , David Catmull wrote:
>
> I looked through the documentation, and didn't see anything that says you
> shouldn't call those methods.
Well, “encodeRestorableStateWithCoder:"
> This method is part of the window restoration system and is called at
> appropriate times to
I looked through the documentation, and didn't see anything that says you
shouldn't call those methods. If they were meant to be overridden and not
called, I expect they'd use something more opaque and special-purpose than
NSCoder.
As for being called twice, I don't see a problem, since they'll ju
On Feb 16, 2017, at 11:32 , David Catmull wrote:
>
> I am explicitly calling encodeRestorableState (in windowWillClose) and
> restoreStateWithCoder (in windowDidLoad).
You can’t. These methods — assuming you’re talking about overrides in (say) the
window controller — are called by the state re
I am explicitly calling encodeRestorableState (in windowWillClose) and
restoreStateWithCoder
(in windowDidLoad), storing and reading the data to/from a file myself. I
know those are normally used as part of the automatic app state
restoration, but I want to restore a window's state regardless of wh
On Feb 16, 2017, at 10:09 , David Catmull wrote:
>
> I'm working on using encodeRestorableState/restoreStateWithCoder to save
> and restore the state of a window. (I'm doing this manually because I want
> to explicitly save my window state in the document and not just rely on the
> OS restoring i
I'm working on using encodeRestorableState/restoreStateWithCoder to save
and restore the state of a window. (I'm doing this manually because I want
to explicitly save my window state in the document and not just rely on the
OS restoring its state as part of restoring the application state.)
The pr