Opening previous document by default
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.