Re: DocumentController subclass needed?
Re: DocumentController subclass needed?
- Subject: Re: DocumentController subclass needed?
- From: Mike Ferris <email@hidden>
- Date: Thu, 7 Jun 2001 11:18:04 -0700
As someone mentioned, you can prevent the untitled document by
implementing -applicationShouldOpenUntitledFile: in your app delegate to
return NO.
You can customize the untitled document creation by instead implementing
-applicationOpenUntitledFile:
To customize the "New" command in the file menu, you can implement a new
action for it in your delegate and reconnect the menu item to that
instead of -newDocument: in NSDocumentController.
There are times when you might need to subclass NSDocumentController,
but they are fairly rare...
Mike Ferris
Begin forwarded message:
From: Mark Slater <email@hidden>
Date: Wed May 23, 2001 12:35:28 AM US/Pacific
To: email@hidden
Subject: DocumentController subclass needed?
I'm writing a program that is designed to open and display a number of
different file formats. Eventually, it will also be able to create a new
document that combines these files into a package of sorts, my own
format. But the default behavior when the application starts is to
create a new document.
Is there an easy way to turn that off in my NSApplication instance, or
is this one of those cases where I'll need to write my own
NSDocumentController subclass? Alternatively, is there a simple way to
get the default action to present an open dialog rather than a new
document?
Thanks!
Mark
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev