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.

--Graham
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to