Re: NSDocument newbie
Re: NSDocument newbie
- Subject: Re: NSDocument newbie
- From: James Bucanek <email@hidden>
- Date: Tue, 26 Jul 2005 18:11:20 -0700
John Stiles wrote on Tuesday, July 26, 2005:
>Now I have another NSDocument question. Instead of having my app open
>up with a meaningless blank document, I'd like for it to start up
>showing the Open dialog. How can I do this? Or at the very least, how
>can I make the empty document at startup go away?
To stop NSApp from trying to create a new window when the application is launched, define
- (BOOL)applicationShouldOpenUntitledFile:(NSApplication*)sender
in your application delegate and just return NO.
My application doesn't prompt for an open dialog when it is opened, but I image that you could catch applicationDidFinishLaunching: and call, or queue up a call to, openDocument:.
--
James Bucanek <mailto:email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden