• 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: Very Simple Demo: Modal Dialog causes later Modal Session to Crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Very Simple Demo: Modal Dialog causes later Modal Session to Crash


  • Subject: Re: Very Simple Demo: Modal Dialog causes later Modal Session to Crash
  • From: Lee Ann Rucker <email@hidden>
  • Date: Wed, 15 Sep 2010 19:49:13 -0700
  • Acceptlanguage: en-US
  • Thread-topic: Very Simple Demo: Modal Dialog causes later Modal Session to Crash

On Sep 15, 2010, at 7:30 PM, Kyle Sluder wrote:

> On Wed, Sep 15, 2010 at 7:11 PM, Jerry Krinock <email@hidden> wrote:
>> Anything that I want to happen before a document opens, in case the app is launched by doubleclicking a document.
>
> I think the right pattern to use here would be to set a flag in
> -applicationDidFinishLaunching: or some later point. Until that flag
> is set, return NO from -applicationShouldOpenUntitledFile:.

But for catching the case where your app is launched by a double-click, what you want is application:openFile: or application:openFiles:

>From the doc:
If the user started up the application by double-clicking a file, the delegate receives the application:openFile: message before receiving applicationDidFinishLaunching:.  (applicationWillFinishLaunching: is sent before application:openFile:.)

If that method returns NO, the application will attempt to open it with openDocumentWithContentsOfURL. Return YES and it assumes you've dealt with it. The runloop is live at this point, because our app shows some UI at that point.

>
> @end
>
>> Is it correct to say that one should not do "GUI Things" or "AppKit Stuff" in -applicationWillFinishLaunching: ?
>
> I would say that is a safe rule to live by.
>
> --Kyle Sluder
> _______________________________________________
>
> 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

_______________________________________________

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: Running Launch Chores, before document open Was: Modal Dialog … Crash
      • From: Jerry Krinock <email@hidden>
References: 
 >Very Simple Demo: Modal Dialog causes later Modal Session to Crash (From: Jerry Krinock <email@hidden>)
 >Re: Very Simple Demo: Modal Dialog causes later Modal Session to Crash (From: Kyle Sluder <email@hidden>)
 >Re: Very Simple Demo: Modal Dialog causes later Modal Session to Crash (From: Jerry Krinock <email@hidden>)
 >Re: Very Simple Demo: Modal Dialog causes later Modal Session to Crash (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Very Simple Demo: Modal Dialog causes later Modal Session to Crash
  • Next by Date: Scripting Bridge Strange Pauses
  • Previous by thread: Re: Very Simple Demo: Modal Dialog causes later Modal Session to Crash
  • Next by thread: Re: Running Launch Chores, before document open Was: Modal Dialog … Crash
  • Index(es):
    • Date
    • Thread