Re: This document's file has been changed by another application?

2008-08-20 Thread Chris Idou
Are you actually saving the contents of the document to a file inside the package? There is a complex arrangement of files inside the directory, some of which will get updated when saving. Try to get the document's fileURL and check if it is the same for the first and subsequent save

Re: This document's file has been changed by another application?

2008-08-20 Thread I. Savant
On Aug 20, 2008, at 5:31 AM, Chris Idou wrote: Are you actually saving the contents of the document to a file inside the package? There is a complex arrangement of files inside the directory, some of which will get updated when saving. One of my older applications takes a package-based

This document's file has been changed by another application?

2008-08-19 Thread Chris Idou
I've got a document based app where the document is actually a directory. Every time I save except the first time I get the above error whether or not things have changed, and even if the directory timestamp is unchanged. Under what circumstances does the above message occur and how do I avoid

Re: This document's file has been changed by another application?

2008-08-19 Thread I. Savant
I've got a document based app where the document is actually a directory. Every time I save except the first time I get the above error whether or not things have changed, and even if the directory timestamp is unchanged. Under what circumstances does the above message occur and how do I

Re: This document's file has been changed by another application?

2008-08-19 Thread Rob Keniger
On 20/08/2008, at 11:36 AM, Chris Idou wrote: I've got a document based app where the document is actually a directory. Every time I save except the first time I get the above error whether or not things have changed, and even if the directory timestamp is unchanged. Under what

Re: This document's file has been changed by another application?

2008-08-19 Thread Chris Idou
Not sure exactly, but here's a thought: Are you deleting and re- creating the directory each time you save? No. How are you creating the folder? Are you using the NSDocument - fileWrapperOfType:error: method? The directory is pre-existing in this case. I'm not calling that method.

Re: This document's file has been changed by another application?

2008-08-19 Thread chaitanya pandit
Are you actually saving the contents of the document to a file inside the package? Try to get the document's fileURL and check if it is the same for the first and subsequent save operations, that might give a hint. The problem might also occur if you arbitrarily tweak the fileUrl. -Chaitanya