How can I save an NSDocument concurrently?

Posted by Paperflyer on Stack Overflow See other posts from Stack Overflow or by Paperflyer
Published on 2010-05-11T17:23:46Z Indexed on 2010/05/12 6:44 UTC
Read the original article Hit count: 321

I have a document based application. Saving the document can take a few seconds, so I want to enable the user to continue using the program while it saves the document in the background.

Due to the document architecture, my application is asked to save to a temporary location and that temporary file is then copied over the old file. However, this means that I can not just run my file saving code in the background and return way before it is done, since the temporary file has to be written completely before it can be copied.

Is there a way to disable this temporary-file-behavior or otherwise enable file saving in the background?

© Stack Overflow or respective owner

Related posts about nsdocument

Related posts about saving