• 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: "Visible at Launch" again, with "least" example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Visible at Launch" again, with "least" example


  • Subject: Re: "Visible at Launch" again, with "least" example
  • From: Bill Cheeseman <email@hidden>
  • Date: Tue, 03 Jul 2007 16:50:21 -0400
  • Thread-topic: "Visible at Launch" again, with "least" example

on 2007-07-03 4:33 PM, Dale Jensen at email@hidden wrote:

> Lacking response the first time, I'll ask again -- how do I, in a
> NSDocument based application, prevent the program from displaying
> (not opening, I do need it to create the window,) an empty window on
> startup?

Normally, to prevent an untitled window from opening when you launch an
application, you implement the -[NSApplication
applicationShouldOpenUntitledFile:] method in your application delegate, and
have it return NO instead of the default YES.

I don't understand why you would want that to happen some of the time but
not other times. But to do it, you should be able to implement logic in that
method, returning NO some of the time and YES other times.

Depending on what you're up to, you might also want to look at
-[NSApplication:openFileWithoutUI:]. But I've never used it, so I'm not
sure.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com

PreFab Software - www.prefabsoftware.com


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: "Visible at Launch" again, with "least" example
      • From: Scott Anguish <email@hidden>
References: 
 >"Visible at Launch" again, with "least" example (From: Dale Jensen <email@hidden>)

  • Prev by Date: Re: Screen Saver Problems
  • Next by Date: Re: NSPopupButton in main window changes when NSUserDefaultsController adds/removes item in Preference Pane
  • Previous by thread: "Visible at Launch" again, with "least" example
  • Next by thread: Re: "Visible at Launch" again, with "least" example
  • Index(es):
    • Date
    • Thread