Re: Temporarily disabling autosave
Re: Temporarily disabling autosave
- Subject: Re: Temporarily disabling autosave
- From: Jerry Krinock <email@hidden>
- Date: Fri, 19 Apr 2013 14:51:20 -0700
On 2013 Apr 19, at 13:58, Alex Zavatone <email@hidden> wrote:
> "many developer type people would assume that a save of a document's data is a write of a delta of the data to a disk, which would take an amount of time that is so small that it would be transparent to the user".
I think this is the model that Apple engineers had in mind when they designed Auto Save. And it is plausible when coupled with Asynchronous Saving (on background threads). But then, Asynchronous Saving was found to be incompatible with Core Data.
* * *
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.
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.
Finally, y'all should know that stashing the completion handler and invoking it later was not my idea but rather an approach suggested by someones who is way smarter than me.
_______________________________________________
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