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

2009-03-06 Thread Eric Gorr
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

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

2009-03-06 Thread Sean McBride
On 3/6/09 4:01 PM, Graham Cox said: 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

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

2009-03-06 Thread Graham Cox
On 07/03/2009, at 4:41 AM, Sean McBride wrote: I actually used a DTS incident on this very issue. As you say, it is hard to get exactly right (if you want finesse). In the end, I got about 90% of the way to perfect. I ended up doing the following: - subclassing NSDocumentController -

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

2009-03-05 Thread Graham Cox
My app needs to show an EULA on start-up (yes, I know, but what can you do?). Handling this is all fine, but I need the modal dialog that is shown to completely block the normal start-up of the app until it completes. Right now I show the dialog using [NSApp runModalForWindow:] and I

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

2009-03-05 Thread Kyle Sluder
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 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

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

2009-03-05 Thread Graham Cox
On 06/03/2009, at 3:39 PM, Kyle Sluder 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

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

2009-03-05 Thread Graham Cox
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

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

2009-03-05 Thread Kyle Sluder
On Fri, Mar 6, 2009 at 12:01 AM, Graham Cox graham@bigpond.com wrote: 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

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

2009-03-05 Thread Jeff Laing
So what? Implement the appropriate methods in your NSApp delegate, or perhaps a custom subclass of NSDocumentController, and have them stow any arguments and keep reminding themselves using -performSelector:withObject:afterDelay: until conditions change such that the original message can be

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

2009-03-05 Thread Graham Cox
On 06/03/2009, at 4:27 PM, Jeff Laing wrote: Why not just have those methods be the ones that display the EULA in a modal window, if required, then continue on as normal (if the user accepts, of course!) Ah, thank you - seems obvious, and indeed, works. :) --Graham

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

2009-03-05 Thread Andy Lee
On Mar 5, 2009, at 11:21 PM, Graham Cox wrote: My app needs to show an EULA on start-up (yes, I know, but what can you do?). Handling this is all fine, but I need the modal dialog that is shown to completely block the normal start-up of the app until it completes. Right now I show the