• 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: Temporarily disabling autosave
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Temporarily disabling autosave


  • Subject: Re: Temporarily disabling autosave
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 22 Apr 2013 15:57:41 -0700

On 2013 Apr 22, at 09:43, Steve Mills <email@hidden> wrote:

> So to sum up, upon pausing autosave

which, per previous messages in this thread, I presume you do by sending the shared document controller -setAutosavingDelay:0.0.  I'm surprised that this has any effect, because this method is "Available in OS X v10.4 and later", and is apparently part of the the old "Tiger" autosave mechanism.

But, OK.  It's not marked as deprecated.  Apparently Apple has tweaked this method to work for both the old "Tiger" autosave and the new "Lion" autosave.  Surprising.

> I explicitly tell it to autosave if needed via autosaveWithImplicitCancellability, in writeToURL return NO and set a userCancelled error if autosave is paused, and in hasUnautosavedChanges return NO if autosave is paused. This seems to handle all the cases I've tested so far.

You should try each of these three tests while autosave has been *paused*.

•  Activate another app.
•  Close the document window.
•  Quit the app.

Debug -[NSDocument autosaveWithImplicitCancellability:completionHandler:] during this test.  If this message is received, examine the implicitlyCancellable parameter and see if it is NO.  Receiving that message with parameter NO is the most difficult case you need to handle, or else convince yourself that it can't happen.


_______________________________________________

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: Temporarily disabling autosave
      • From: Mike Abdullah <email@hidden>
    • Re: Temporarily disabling autosave
      • From: Steve Mills <email@hidden>
References: 
 >Temporarily disabling autosave (From: Steve Mills <email@hidden>)
 >Re: Temporarily disabling autosave (From: Mike Abdullah <email@hidden>)
 >Re: Temporarily disabling autosave (From: Steve Mills <email@hidden>)
 >Re: Temporarily disabling autosave (From: Mike Abdullah <email@hidden>)
 >Re: Temporarily disabling autosave (From: Jerry Krinock <email@hidden>)
 >Re: Temporarily disabling autosave (From: Mike Abdullah <email@hidden>)
 >Re: Temporarily disabling autosave (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Third time I ask - please help. How to trace visible change in a UIView (UIWebView)
  • Next by Date: Re: NSScrollView in NSTabView autolayout problem
  • Previous by thread: Re: Temporarily disabling autosave
  • Next by thread: Re: Temporarily disabling autosave
  • Index(es):
    • Date
    • Thread