I have an application where documents are created which can have other files 
attached to them. A user can open the file in its native application. I copy 
the original file to a temporary folder (using NSTemporaryDirectory() and 
adding the file name to it) and ask NSWorkspace to open it. 

If the user edits the file, I pick that up when they go back to my application 
and ask them if they want to update the version in their document to be the 
edited version.

All this works fine, and has right through 10.7, and 10.8 *except* for files 
which are opened in Preview. 

As soon as you start editing them you get a message "The original document 
can't be changed, so a duplicate with your changes has been created".

If I open the exact same file in another program and edit it and save it, 
everything works as expected.

Does anyone know why you would get that error message, and how to avoid it? I 
don't understand why Preview would refuse to edit that file in place - is it 
because it is in a temporary folder?


Thanks

Gideon

_______________________________________________

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