• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Saving window and view state with NSDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving window and view state with NSDocument


  • Subject: Re: Saving window and view state with NSDocument
  • From: Mike Abdullah <email@hidden>
  • Date: Tue, 22 Sep 2015 09:56:02 +0100

> On 22 Sep 2015, at 04:33, Kurt Sutter <email@hidden> wrote:
>
> Thanks for the info
>
>> BTW you decided to fight against framework (as others mentioned state restoration is responsible for this).
>
> The documentation on state restoration is somewhat sparse. However, as I understood, it only kicks in when I re-open an application. When the user opens a document after opening the application, state restoration would not restore that document — would it?

My understanding is Apple’s state restoration does not kick in for your example.

But in theory you could piggyback on top of the built-in support to implement your own. i.e. write a custom encoder/decoder. At save time, ask the document to save its state using that encoder, and store the result as part of the doc. When opening the doc, reverse the process to decode state.
_______________________________________________

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


  • Follow-Ups:
    • Re: Saving window and view state with NSDocument
      • From: Marek Hrušovský <email@hidden>
References: 
 >Saving window and view state with NSDocument (From: Kurt Sutter <email@hidden>)
 >Re: Saving window and view state with NSDocument (From: Marek Hrušovský <email@hidden>)
 >Re: Saving window and view state with NSDocument (From: Kurt Sutter <email@hidden>)
 >Re: Saving window and view state with NSDocument (From: Marek Hrušovský <email@hidden>)
 >Re: Saving window and view state with NSDocument (From: Kurt Sutter <email@hidden>)

  • Prev by Date: Re: Saving window and view state with NSDocument
  • Next by Date: About App size after using app thinning.
  • Previous by thread: Re: Saving window and view state with NSDocument
  • Next by thread: Re: Saving window and view state with NSDocument
  • Index(es):
    • Date
    • Thread