On 2013 Apr 22, at 09:43, Steve Mills <smi...@makemusic.com> 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 (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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to