On Apr 19, 2013, at 16:51:20, Jerry Krinock <je...@ieee.org>
 wrote:

> Maybe you Steve and Alex Zavatone may be on to something there.  You're 
> suggesting that, rather than handling the autosave when it is requested 
> during a long-winded operation, you turn autosave off *before* the 
> long-winded operation begins, so that you won't get any such requests.

Exactly, and it seems like such a basic part of the entire autosave concept 
that it's amazing Apple didn't build it in from the start.

> The problem with that is that the way you turn autosave off is by returning 
> NO from +autosavesInPlace, which is a class method.  I ask then: Why did 
> Apple make +autosavesInPlace a class method, other than to make it difficult 
> to change on the fly?  You could do it with a static or global variable, I 
> guess.  Your results will definitely be interesting.  Let us know what 
> happens.

Actually, I believe you're mistaken. autosaveInPlace merely tells autosave 
that, if turned on, it should replace the actual file once the autosave has 
completed successfully. If it's off, autosaves are stored elsewhere in a folder 
of NSDocument's choosing. The way to turn autosave on or off is through 
NSDocumentController's setAutosavingDelay method, where 0 means off. But, doing 
so doesn't seem to affect open documents if they've already scheduled an 
autosave (seems like a bug to me - turning it off from here should turn it off 
everywhere).

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157



_______________________________________________

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