Prompt user to save when closing app

后端 未结 5 986
耶瑟儿~
耶瑟儿~ 2021-01-13 09:12

I\'m writing what boils down to a document editor. When the application is closing, I need to prompt the user to save changes. This is easy enough. My question is when is it

5条回答
  •  情话喂你
    2021-01-13 09:52

    I personally prefer to just close the program when the user selects close, if there are any unsaved documents at close time I prefer to keep backup copies of those files and inform the user that there are unsaved documents when they next open the application.

    I do this for a couple of reasons, number one I like my applications to close when I tell them to close, and number two by keeping a temporary copy of the file that I update with all the changes as the user works on it I safeguard against unexpected crashes and closes of my applications.

    So with this technique you don't need to worry about ow the application has been closed.

提交回复
热议问题