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

Re: opening an open document


  • Subject: Re: opening an open document
  • From: Christophe Dore <email@hidden>
  • Date: Fri, 18 Jan 2002 10:54:31 +0100

Usually, applications check the last modified date of the file each time a window about this file becomes main. if the date changed from the last check, applications propose to reload the file.





Gerriet M. Denkmann wrote:

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.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >opening an open document (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Casting NSRect to CGRect?
  • Next by Date: Re: Displaying ICON for Device in Finder
  • Previous by thread: opening an open document
  • Next by thread: Of Cells, TableViews and Matrices
  • Index(es):
    • Date
    • Thread