知识卡片
取消需要独立可响应路径
取消命令要由不被当前长任务阻塞的监听职责接收,再终止活动、释放资源,并通知协作组件撤销或停止相关工作。只绘制一个取消按钮而让处理它的线程也等待原任务,用户就会感到按钮失灵。取消是跨组件的行为协议,不是单个界面控件。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
- · 第13章 易用性
原书出处 · 1 处
- 易用性 · 查看原书依据
When the user issues a cancel command, the system must be listening for it (thus, there is the responsibility to have a constant listener that is not blocked by the actions of whatever is being canceled); the activity being canceled must be terminated; any resources being used by the canceled activity must be freed; and components that are collaborating with the canceled activity must be informed so that they can also take appropriate action.
参考来源
- 位置:《Software Architecture in Practice, 4th Edition》第13章《易用性》(来源项目:book-sources;源文件:extracted/Software Architecture in Practice, 4th Edition/_epub-src/ch13.html)
- 结论依据:所引连续原文给出本卡机制或取舍;条件与示例结合本节已读上下文解释。
- 原始内容:When the user issues a cancel command, the system must be listening for it (thus, there is the responsibility to have a constant listener that is not blocked by the actions of whatever is being canceled); the activity being canceled must be terminated; any resources being used by the canceled activity must be freed; and components that are collaborating with the canceled activity must be informed so that they can also take appropriate action.