Re: "Visible at Launch" again, with "least" example
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