Re: Temporarily disabling autosave
Re: Temporarily disabling autosave
- Subject: Re: Temporarily disabling autosave
- From: Jerry Krinock <email@hidden>
- Date: Tue, 23 Apr 2013 12:59:57 -0700
On 2013 Apr 23, at 08:18, Steve Mills <email@hidden> wrote:
> What do you mean by "not running the show in Lion autosave"? As opposed to 10.8 and later, or 10.6 and earlier? (Please use numbers, as it's easier to remember the order of numbered versions.)
When I say "Lion Autosave", I mean this feature, which was introduced in Mac OS X 10.7 "Lion",
http://support.apple.com/kb/HT4753?viewlocale=en_US&locale=en_US
There was also a more primitive "autosave" mechanism introduced in Mac OS X 10.4, which was adopted by very few apps. I call that "Tiger Autosave".
>> I've never tried -hasUnautosavedChanges, because it's another "Tiger" autosave method, available since Mac OS X 10.4. Do you ever get that message? If so, then returning NO might pause -[NSDocument autosaveWithImplicitCancellability:completionHandler:], which is the holy grail here. If that works, I shall drop my jaw again.
>
> Yes, we get this message when running under 10.8.
Great! If you can stop Cocoa from sending you -[NSDocument autosaveWithImplicitCancellability:completionHandler:] whenever you want to, simply by returning NO from -hasUnautosavedChanges, you have saved yourself a lot of work.
I shall certainly try that next time I have a need.
_______________________________________________
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