Re: Temporarily disabling autosave
Re: Temporarily disabling autosave
- Subject: Re: Temporarily disabling autosave
- From: Jerry Krinock <email@hidden>
- Date: Wed, 24 Apr 2013 07:25:25 -0700
I agree with all of Mike's warnings, and continue to be amazed that Steve is able to sidestep the whole minefield of -autosaveWithImplicitCancellability:completionHandler: hangs in which so many of us have lost limbs.
In my Lion-autosaved app, I override -autosaveWithImplicitCancellability:completionHandler:, and do NOT invoke -hasUnautosavedChanges. (I consider -isDocumentEdited instead.) So, out of curiosity, I overrode -hasUnautosavedChanges to see if it ever gets called by Cocoa. It does, quite often, and super returns either YES or NO, as expected. So it could be that the God of Autosave in Cocoa invokes -hasUnautosavedChanges not only during but *before* invoking -autosaveWithImplicitCancellability:completionHandler:. And if you tell it NO on the *before*, indeed it may forego invoking -autosaveWithImplicitCancellability:completionHandler:.
I'm rooting for you, Steve.
_______________________________________________
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