• 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: How to create a modal dialog that blocks on start-up?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create a modal dialog that blocks on start-up?


  • Subject: Re: How to create a modal dialog that blocks on start-up?
  • From: Eric Gorr <email@hidden>
  • Date: Fri, 6 Mar 2009 08:49:57 -0500


On Mar 6, 2009, at 12:01 AM, Graham Cox wrote:


On 06/03/2009, at 3:50 PM, Graham Cox wrote:

Implement -applicationShouldOpenUntitledFile: in your app delegate to
return a flag variable. Make sure that flag starts out as NO until
your EULA is dismissed.


--Kyle Sluder


OK. Then after closing the dialog the app doesn't open an untitled window.


Actually the problem is more complicated than this.

The app might have been launched with a file or files, or just by double-clicking. So if the EULA needs to be displayed this should just defer opening the required documents. By stopping the untitled or other files from opening, they never do.

The apple events that supply the launch files or otherwise need to be captured (for later resending) or deferred, a the moment they are either discarded or processed, neither of which is appropriate.

This is WAY too hard. NSApplication should either provide a delegate hook for the purpose of displaying a modal window at startup or else detect that a modal window was put up during launch and defer the launch events until later.

I need a workaround, and fast - I've got to get this in before the end of the weekend.

I believe there is a technique where by your write a separate application which does nothing but show your dialog and then launches your real application. Of course, you would have to find a way to forward document open AppleEvents and perhaps other things, but it should work.


Unfortunately, I don't have the link to this kind of technique in front of me at the moment...

_______________________________________________

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: 
 >How to create a modal dialog that blocks on start-up? (From: Graham Cox <email@hidden>)
 >Re: How to create a modal dialog that blocks on start-up? (From: Kyle Sluder <email@hidden>)
 >Re: How to create a modal dialog that blocks on start-up? (From: Graham Cox <email@hidden>)
 >Re: How to create a modal dialog that blocks on start-up? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: [Q] NSObject's poseAsClass - Replacement?
  • Next by Date: Re: How to search for mop3 files, retrieve those file and play these file into apps
  • Previous by thread: Re: How to create a modal dialog that blocks on start-up?
  • Next by thread: Re: How to create a modal dialog that blocks on start-up?
  • Index(es):
    • Date
    • Thread