Re: Right way to change default app launch behavior?
Re: Right way to change default app launch behavior?
- Subject: Re: Right way to change default app launch behavior?
- From: Rick Mann <email@hidden>
- Date: Tue, 11 Jan 2011 19:45:00 -0800
On Jan 11, 2011, at 19:39:45, Sherm Pendley wrote:
> On Tue, Jan 11, 2011 at 10:21 PM, Rick Mann <email@hidden> wrote:
>> I have a document-based app. I want to modify the behavior when it launches: instead of opening a new, untitled document, I want it to first check some stuff, then generally re-open the last-opened document.
>>
>> After reading through the various cocoa app architecture docs, I'm not actually sure where the right place to do that is.
>
> NSApp's delegate seems like the best choice to me.
>
> Return NO from the delegate's -applicationShouldOpenUntitledFile: to
> avoid opening an untitled document, then do the rest of your checks
> and re-open the last-opened document in
> -applicationDidFinishLaunching:.
Oh, thanks! I totally didn't see -applicationShouldOpenUntitledFile:! Thanks.
>
> sherm--
>
> --
> Cocoa programming in Perl:
> http://camelbones.sourceforge.net
_______________________________________________
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