Re: Lion: unlocking a document
Re: Lion: unlocking a document
- Subject: Re: Lion: unlocking a document
- From: Mike Abdullah <email@hidden>
- Date: Fri, 10 Feb 2012 23:19:08 +0000
On 7 Feb 2012, at 11:08, Georg Seifert wrote:
> Hi,
>
> I still have problems with my document saving behavior in Lion.
>
> If I open a file that my app can only read (CFBundleRoleType = Viewer) the state is set to locked. If I unlock it and do some changes, the autosave replaces the document file with a native file.
>
> This is really not exactable. Not all data is read from the original (binary) file and so I need to keep the original.
>
> Is there any way to prevent this. I would prefer that if the user unlocks the document, it actually is duplicated.
Some ideas:
- Override one of the save or write methods to fail and return NSUserCancelledError under these circumstances
- Does overriding -checkAutosavingSafetyAndReturnError: to return a custom error do the trick?
- Jump in at -willPresentError: and provide your own custom error
_______________________________________________
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