Hi (this is my first email on the Apple mailing list) ;-)

I would like to perform `saveDocument:` in the process of opening a document (I 
call this method in `- (id)initWithContentsOfURL:ofType:error:`.

It does not work because of a deadlock.

I would like to know if you have any idea about that.

PS: I also tried to override `(id)makeDocumentWithContentsOfURL:ofType:error:` 
and `- (void)openDocumentWithContentsOfURL:display:completionHandler:` (for 
this purpose, I subclass NSDocumentController. I have tried to call 
`saveDocument:` in "windowDidLoad". All lead to the same deadlock.

PPS: Why do I want to do that? When a document is opened, sometimes some 
corrupted data needs to be fixed. I do it, but I want to save these fixes. So 
that the user won't remark anything.

PPS: My document handles "additionalData" (file wrapper), but this should not 
change anything.

Thanks
Colas
`
_______________________________________________

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