• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: DocumentController subclass needed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Problem in viewing with Help Viewer
  • Next by Date: Re: TextEdit vs SimpleText: keeping track of open files
  • Previous by thread: Re: "public header"
  • Next by thread: Re: TextEdit vs SimpleText: keeping track of open files
  • Index(es):
    • Date
    • Thread