On 2013 Oct 31, at 12:18, Sean McBride <s...@rogue-research.com> wrote:

> On Wed, 30 Oct 2013 16:00:23 -0700, Jerry Krinock said:
> 
>> I am surprised because this is actually a Core Data
>> NSPersistentDocument, and following Apple recommendations I have implemented
>> -[MyDocument canAsynchronouslyWriteToURL:ofType:forSaveOperation:]
>> to return NO.
> 
> Where do they recommend that?  The NSPersistentDocument class reference docs 
> for canAsynchronouslyWriteToURL:ofType:forSaveOperation: say 
> "NSPersistentDocument does not support asynchronous save operations. You 
> should not override this method”

Hello, Sean.  Maybe you read my post too fast.  I have overridden it to return 
NO.  Just:  return NO ;

I was one of the guinea pigs back in 2011, who learned along with Apple that 
NSPersistentDocument doesn’t like asynchronous save.  Originally, the 
documentation did not say that, and actually, it almost worked.  There were 
only one or two unsolvable edge cases that would give one of those damned 
autosave hangs a few times a day :))  I’d implemented that override so I could 
play with it YES and NO, before ultimately being told that the correct answer 
was unconditionally NO.

> (NSPersistentDocument is infuriating.  No support for async save, no support 
> for packages/bundles, and no love at all in recent OSes.)

The main thing that keeps me coming back for more Core Data is that it does 
Undo and Redo, which has been trouble-free since I starting using GCUndoManager 
in place of NSUndoManager.



_______________________________________________

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