• 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 previous document by default
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Opening previous document by default


  • Subject: Opening previous document by default
  • From: "John A. Debay" <email@hidden>
  • Date: Fri, 20 Jun 2003 14:31:41 -0500 (CDT)

Hi all,

When my application starts up, I would like it to open the last document
the user was working on. If no previous document is found, I want to open
a new, untitled document. In order to achieve this, I subclassed
NSDocumentController and overrode openUntitledDocumentOfType:display: to
open the last document instead. This worked great until I clicked File ->
New, which called the same code, and which opened up the previous document
again instead of a new document. Im having trouble seeing how my document
controller can distinguish between opening a document by default when the
application is created but opening a new document when directed to by the
user.

Any help that can be provided on this would be appreciated.

Thanks,
John
_______________________________________________
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.

  • Follow-Ups:
    • Re: Opening previous document by default
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Opening previous document by default
      • From: Matt Gemmell <email@hidden>
  • Prev by Date: Re: crash when loading nib
  • Next by Date: Re: How to use NSDirectoryEnumerator class
  • Previous by thread: NSTask help
  • Next by thread: Re: Opening previous document by default
  • Index(es):
    • Date
    • Thread