On Apr 19, 2013, at 13:04 , Steve Mills <smi...@makemusic.com> wrote:

> This leads me to believe that the autosave dirty state is getting out of 
> whack if the save doesn't happen as planned. Any ideas?

a. When you get an autosave during playback, can you save the dirty state of 
the document, return a YES result but not actually autosave, then when playback 
stops, if you have this saved state, restore it (via NSChangeReadOtherContents 
or whatever)? The downside is that if your app crashes during playback, the 
pending changes are lost.

b. At a higher level, force an autosave to occur just before playback starts, 
then don't let the document get dirtied till playback ends.

c. If the autosave is asynchronous, you can just not return from it until 
playback finishes. Note, however, this does not prevent another autosave from 
arriving after some time interval, so you need to be careful that the second 
one doesn't step on the first one. (This autosave behavior is a bug, IMO, but 
it is the current behavior.)

_______________________________________________

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