• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSDocument annoying warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDocument annoying warning


  • Subject: NSDocument annoying warning
  • From: Randall Meadows <email@hidden>
  • Date: Fri, 14 Nov 2008 16:21:33 -0700

The NSDocument class reference contains this note:

"As of Mac OS X v10.5, this method checks to see if the document's file has been modified since the document was opened or most recently saved or reverted, in addition to the checking for file moving, renaming, and trashing that it has done since Mac OS X v10.1. When it senses file modification it presents an alert telling the user "This document’s file has been changed by another application since you opened or saved it,” giving them the choice of saving or not saving. For backward binary compatibility this is only done in applications linked against Mac OS X v10.5 or later."

I am getting that alert, since when I now open a document (which is actually a bundle) in this application, I create a new file in the document's bundle, indicating that it is a "new and improved" version of the file; this new file is a modified version of another file in the bundle, which I leave in place so as to maintain backward compatibility for older versions of this application (deployment at the client's site will not be 100%, and people using both old and new versions will be opening documents, and I want them both to continue working).

Now, that alert is actually a lie, since it isn't "another application" that made the change. My application did it on purpose, and I want those changes to stick.

In addition, when the app opens the document, it changes the extension to indicate that this particular document is in use (since it's typically opened from a server, and multiple users could be working in the same folder, and we use this as an alert to the 2nd user that someone's already working on this particular file. As of 10.5, we now get a warning dialog upon a save attempt that "This document has been renamed to foobar.newextension". Yes, I know, the app did that.

Is there something I can do to tell NSDocument (or whomever) that these changes that it thinks are made by another application are on purpose, and that it needs to keep its opinions regarding them to itself? If <whatever> ends up marking the file as "dirty", that's fine by me. I'll go continue scouring the docs, but if someone has a pointer, I'd appreciate it.


Thanks! randy_______________________________________________

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


  • Follow-Ups:
    • Re: NSDocument annoying warning
      • From: Mike Abdullah <email@hidden>
    • Re: NSDocument annoying warning
      • From: Quincey Morris <email@hidden>
    • Re: NSDocument annoying warning
      • From: Randall Meadows <email@hidden>
  • Prev by Date: RE: How do you get the OS X version number in C or C++?
  • Next by Date: Re: Core Data, Filtering by PopUps & Bindings Confusion
  • Previous by thread: Re: Tabbing PDF Annotation Editor between annotations in "edit mode"?
  • Next by thread: Re: NSDocument annoying warning
  • Index(es):
    • Date
    • Thread