Re: Preventing Document-Based App from opening new doc when opened
Re: Preventing Document-Based App from opening new doc when opened
- Subject: Re: Preventing Document-Based App from opening new doc when opened
- From: "Erik M. Buck" <email@hidden>
- Date: Thu, 8 Nov 2001 17:41:38 -0600
>
My document based app keeps opening a brand new blank document whenever it
>
is opened, or if there is no document open, it will make a new one when
>
switching to it. Is there any way to prevent this from happening?
>
_______________________________________________
This is the required behavior according to Apple's guidelines. However, see
applicationShouldOpenUntitledFile:
- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender
Invoked immediately before opening an untitled file. Return NO to prevent
the application from opening an untitled file; return YES, otherwise. Note
that applicationOpenUntitledFile: is invoked if this method returns YES.
----------------------------------------------------------------------------
----
This question is asked way too many times. Please do a google search before
posting to this forum.