On Close: MsgBox ("Do you want to save?") Or MsgBox ("Do you want to exit without saving?")

Which approach is better and why.

+4
source share
6 answers

MsgBox ("the file has been modified. Do you want to save before exiting?")

With the following options

  • Save and close (default, left position)
  • Cancel (center position, next to the left button)
  • Cancel (right position, with the interval between other buttons and this).

The file xxx.txt has been modified. Do you wish to save before quitting? +---------+ +--------+ +-------------+ | Discard | <---- SPACING ----> | Cancel | | Save & Quit | +---------+ +--------+ +-------------+ 

NEVER turn ON the ejection between other buttons, as this will cause problems with skipping. http://www.codinghorror.com/blog/2010/03/the-opposite-of-fitts-law.html

+1
source

Instead of a yes / no question, use a question with custom buttons:

 The file blah.txt has been modified. Would you like to save or discard it? +------+ +---------+ +--------+ | Save | | Discard | | Cancel | +------+ +---------+ +--------+ 
+7
source

You should look for interface recommendations for the platform you are developing on (search for “user interface guidelines” or “design and design guidelines”). If they exist, you must follow them so that your application is more likely to meet user expectations. For example, Apple has specific recommendations on what to do in this situation on Mac OS X.

A typical piece of advice for this particular scenario is the lack of Yes or No buttons, but buttons describing the action that they perform. For example, you can display a message box, for example: "The document a.txt has been modified. Save changes?" with the buttons "Save", "Exit without saving" and "Cancel". This allows the user to understand what each button will do.

+3
source

Your application should, as one of its main goals, NEVER lose user data. One way to achieve this is to regularly perform the work that the user performed without user intervention .

That most people are used to in real life. When people write in a notebook, they don’t expect the paper to ask, “Do you want me to really make these changes on paper?” They expect the changes to be permanent if they do not explicitly throw them away.

So, I wouldn’t even ask this question, wouldn’t implement the reliable undo functionality and just ask (maybe at the beginning of the working session) the new name of the save file, if this is a new job that saves continuously and upon exit.

These ideas come from a very enlightening Why software sucks ... and what you can do with it .

+2
source

Something else that I personally consider important is setting the focus to any button equivalent to canceling. I think that many users are accustomed to these types of tips and just got into it without even reading what is in the dialog box. When they do this, I think that in most situations it is better to play it safely and cancel it than to do something.

+1
source

I am very sorry that they asked me if I personally want to save. If I needed it, I would do it. If I forget, then most of the programs that I use have an automatic save function.

The idea of ​​finding user interface guidelines is good, but I agree with the one who suggested minimal user intervention. His paper writing analogy hit a nail on the head. These days, many programs have some version control.

0
source

Source: https://habr.com/ru/post/1313816/


All Articles