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

References: 
 >Right way to change default app launch behavior? (From: Rick Mann <email@hidden>)
 >Re: Right way to change default app launch behavior? (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: Right way to change default app launch behavior?
  • Next by Date: Core Data and Undo. Was: NSUndoManager retain/release
  • Previous by thread: Re: Right way to change default app launch behavior?
  • Next by thread: Cocoaheads Lake Forest meets Wed, 1/12 at Ozate in Laguna Hills. Note different location!
  • Index(es):
    • Date
    • Thread