• 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: Why can I make a new document this way?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why can I make a new document this way?!


  • Subject: Re: Why can I make a new document this way?!
  • From: Angela Brett <email@hidden>
  • Date: Wed, 17 Mar 2004 22:31:15 +1300

As I understand it, the delegate method applicationShouldOpenUntitledFile: controls whether an untitled document is opened when the application starts up, or when the app icon is clicked and there are no documents open. Your script is explicitly telling the app to make a new document, so that's what the app will do.

Actually now that I look at the documentation for applicationShouldOpenUntitledFile: I can see why you'd think it's called for any untitled file... I guess that's a bug in the documentation.

I suspect that if you don't ever want to create an untitled document, what you really want to do is make your app a viewer rather than an editor. You can do that by editing your app's document types (under 'Info.plist entries' in the target settings.) Go through the list of documents and make sure the Role: pop-up menu is set to Viewer for types you don't want to be able to edit.
--
Angela Brett
email@hidden
http://apronyms.com/angela
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Why can I make a new document this way?!
      • From: Charles Srstka <email@hidden>
    • Re: Why can I make a new document this way?!
      • From: Darkshadow <email@hidden>
References: 
 >Why can I make a new document this way?! (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: multiple views with segmented control
  • Next by Date: Re: Making an NSWindow Resizable
  • Previous by thread: Re: Why can I make a new document this way?!
  • Next by thread: Re: Why can I make a new document this way?!
  • Index(es):
    • Date
    • Thread