On 2013 Apr 23, at 08:18, Steve Mills <smi...@makemusic.com> 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 (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