为什么模态对话框是邪恶的? [英] Why are modal dialog boxes evil?

查看:49
本文介绍了为什么模态对话框是邪恶的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

何时真正需要模态对话框?.为什么模式对话框是邪恶的?是因为人们还是不阅读它们吗?是因为它们执行起来常常很差?还有吗?

Re the recent question at when are modal dialogs truly necessary?. WHY are modal dialog boxes evil? Is it because people don't read them anyway? Because they are often implemented so poorly? Something else?

推荐答案

到目前为止,大约有一半的答案都在解决确认对话框而不是 modal 对话框的缺陷.尽管绝大多数确认对话框都是模式对话框,但这并不意味着这两个术语是同义词.

About half of the answers so far are addressing the flaws of confirmation dialogs, not of modal dialogs. While the vast majority of confirmation dialogs are modal, this does not mean that the two terms are synonymous.

一个 mod al对话框是一种将程序置于特定的模式的对话框,不允许您在该模式下执行任何与该模式不符的操作打开.在最常见的实现中,这意味着您无法访问任何其他窗口.

A modal dialog is one which puts the program into a specific mode and does not allow you to do anything which doesn't correspond to that mode while it is open. In the most common implementation, this means you can't access any other windows.

这很邪恶.

考虑通讯录应用程序.假设通讯录中已有一个人,并且希望添加他们的室友.

Consider an address book application. Suppose you have an existing person in the address book and you wish to add their roommate.

  • 如果添加人"对话框是非模式对话框,则可以在旧记录和新记录之间来回切换,以复制和粘贴数据.
  • 如果添加人"对话框是模式对话框,则在打开添加对话框时您不能对旧记录执行任何操作.您可以在选择添加"之前选择要复制的内容,但只能选择一件事.其他所有内容都必须手动重新输入.

在极少数情况下,您会碰到真正必须一件一件完成的事情,而又不允许用户偏离该任务,直到完成为止.模态对话框适用于这种情况. 但是这些情况很少见!这基本上是此问题引用的另一个线程的重点.

On rare occasions, you run into something which truly must be done in one piece without allowing the user to diverge from that task until it is complete. Modal dialogs are appropriate for such cases. But these cases are very rare! Which is basically the point of the other thread referenced by this question.

这篇关于为什么模态对话框是邪恶的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆