Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Prevent accidental window closure in a given app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Prevent accidental window closure in a given app
Authored by: ericasadun on Mar 22, '04 09:13:27PM

It's easy enough to add an "Are you sure" dialog to Safari.

Build a new window in Interface Builder. Add text ("Are you sure")
and two buttons (Cancel, OK).

Connect the Quit menu item (in MainMenu.nib) to the Window
(make key and order front) and connect OK to File's Owner/Terminate. Have Cancel close the window.

[ Reply to This | # ]
Proper dialog box text
Authored by: derrickbass on Mar 22, '04 11:34:47PM

Well maybe this doesn't really matter for when you modify an application yourself, but one of the things that sets Macs apart from Windows is the useful text in dialog boxes and on the buttons. (I've seen dialog boxes in Windows with triple negatives! Very hard to decide if OK or Cancel is what you want!)

The text should be: "Are you sure you want to quit?" and the buttons should be "Quit" and "Cancel". (The reason you use "Quit" instead of "OK" is so the user does not have to read and understand the text. "OK" is almost never appropriate.)

[ Reply to This | # ]
Proper dialog box text
Authored by: kps on Mar 23, '04 10:15:35AM