Re: Avoid creating a new document when launching an application
Re: Avoid creating a new document when launching an application
- Subject: Re: Avoid creating a new document when launching an application
- From: m <email@hidden>
- Date: Sat, 15 Oct 2005 15:47:44 -0700
On Oct 15, 2005, at 1:45 PM, email@hidden wrote:
I have a Document-based application (NSPersisentDocument to be
precise) for
which I would like to override the default behavior when launching:
I'd like to
avoid creating a new blank document (for example by displaying an
open dialog).
Add this method to your app's delegate.
- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender
{
[[NSDocumentController sharedDocumentController]
performSelector:@selector(openDocument:) withObject:self afterDelay:
0.1];
return NO;
}
_murat
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden