When is a document moved or renamed?
When is a document moved or renamed?
- Subject: When is a document moved or renamed?
- From: LAURENS Jérôme <email@hidden>
- Date: Thu, 12 Jun 2008 02:01:20 +0200
Hi all,
I have a document based application with 2 kinds of documents:masters
and slaves
When saving the master document, all its slaves are also saved.
So I override one of the writeToURL method of the master class
document to send the appropriate writeToURL to its slaves.
My app also does rather complex tasks that need to save the master
document without user interaction.
In some situations, I cannot send a saveDocument: message to the slave
document and have a smooth operation:
unexpectedly, a dialog box appears saying that the location of the
slave document is lost, and that I must save it again.
Then the standard save panel appears, and is already filled with the
proper name of the slave document.
In the saveDocumentWithDelegate:... description (inside NSDocument.h),
it is said that
"it may present a panel asking the user to make a decision for any of
the following situations:
1) The document's file or file package was moved or renamed since
it was opened or most recently saved.
2) The document's file or file package was deleted or trashed
since it was opened or most recently saved."
Since a panel appears, one of the above situation is recognized. But
in no way, I am willing to move nor rename the file!
The file URL never changes. What puzzles me is that my app perfectly
knows the URL of the document because it presents the save panel at
the right location with the right name!
Any hint is welcome,
TIA
_______________________________________________
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