Add delegate method to prevent automatically opening a new document on launch in document based applications.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2009-08-19 16:55:28 -07:00
1 parent 14528d5a49
commit 3060c3f100
1 file changed
+7 -2
+7 -2
View File
@@ -268,8 +268,13 @@ CPRunContinuesResponse = -1002;
[defaultCenter
postNotificationName:CPApplicationWillFinishLaunchingNotification
object:self];
if (_documentController)
var needsUntitled = !!_documentController;
if (needsUntitled && [_delegate respondsToSelector: @selector(applicationShouldOpenUntitledFile:)])
needsUntitled = [_delegate applicationShouldOpenUntitledFile:self];
if (needsUntitled)
[_documentController newDocument:self];
[defaultCenter