• 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
opening an open document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

opening an open document


  • Subject: opening an open document
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Fri, 18 Jan 2002 02:13:02 +0100

I double click on some file and my document-based app does open it.
So far so good.

Now I take an editor, modify the file, save it, and double click again on the file.

My application comes forward and shows the file. But it is still the old version.

I am looking for some delegate method like:
-(BOOL)onOpeningAnOpenFileCheckModificationDate
If this method returns YES the modification date will be checked, and if it is later than the already open file, revertDocumentToSaved will be called.

But I have not found such a method - I looked in NSApplication and in NSDocumentController.

If such a method does not exist - what can I do to implement this behaviour?

If I have to override openDocumentWithContentsOfFile:display: - how do I tell my application to use MyDocumentController instead of the sharedDocumentController ?

Gerriet.


  • Follow-Ups:
    • Re: opening an open document
      • From: Christophe Dore <email@hidden>
  • Prev by Date: Re: Casting NSRect to CGRect?
  • Next by Date: Re: Casting NSRect to CGRect?
  • Previous by thread: Re: Casting NSRect to CGRect?
  • Next by thread: Re: opening an open document
  • Index(es):
    • Date
    • Thread