• 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: Right way to change default app launch behavior?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Right way to change default app launch behavior?


  • Subject: Re: Right way to change default app launch behavior?
  • From: Sherm Pendley <email@hidden>
  • Date: Tue, 11 Jan 2011 22:39:45 -0500

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:.

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

  • Follow-Ups:
    • Re: Right way to change default app launch behavior?
      • From: Rick Mann <email@hidden>
References: 
 >Right way to change default app launch behavior? (From: Rick Mann <email@hidden>)

  • Prev by Date: [SOLVED] Responding to changes in outline view
  • Next by Date: Re: Right way to change default app launch behavior?
  • Previous by thread: Right way to change default app launch behavior?
  • Next by thread: Re: Right way to change default app launch behavior?
  • Index(es):
    • Date
    • Thread