“单例无模式”是什么意思? 意思是?

发布于 2024-07-25 07:40:47 字数 54 浏览 7 评论 0原文

我知道什么是单例,但是在浏览网络应用程序时,我的同事说“单例-无模式”。 他这话是什么意思?

I know what a singleton is, but while walking through a web-app, my co-worker said "singleton-modeless". What does he mean by this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

烛影斜 2024-08-01 07:40:47

那么,无模式形式与模态形式相反。

无模式形式

允许您将焦点从一个表单更改为另一个表单。

情态形式

在模态窗体关闭之前不允许焦点更改。

话虽这么说,单例无模式必须意味着无模式表单的单个实例。

Well a modeless form is the opposite of a modal form.

modeless form

Allows you to change the focus from form to form.

modal form

Disallows focus change until the modal form is closed.

That being said, singleton modeless must mean a single instance of a modeless form.

我在 MSDN 体系结构中心此处找到了对其的引用。 它们似乎意味着一个非模态窗口(换句话说,用户在与其父级交互之前不会被迫与其交互)并且仅存在一个窗口实例。

我不确定你同事的意思是不是这个意思,但我不会因为不知道他的意思而感到难过。 他可能并不真正了解自己。

I found a reference to it in the MSDN Architecture Center here. They appear to mean a window that is not modal (in other words, the user is not forced to interact with it before interacting with its parent) and where only one instance of it exists.

I'm not sure if that's what you're co-worker meant but I wouldn't feel bad about not knowing what he meant. He may not have actually known himself.

墨小沫ゞ 2024-08-01 07:40:47

单例无模式或模式对话框很棒,因为您不必担心同时向用户显示 2 个实例。

Ext.MessageBox是这样的,通过方法调用,单例模式。 它也可以用作单例无模式的基础。

我同意,模态对话框通常很糟糕,除非经过深思熟虑。 大多数现代应用程序都采用无模式抽屉或功能区,用户在处理手头的任务时始终可以使用它们!

所以检查一下你的对话; 您现在的应用程序中可能不需要其中的一半......

Singleton modeless or modal dialog is great because you don't have to worry that 2 instances will be shown to the user at the same time.

Ext.MessageBox is like this, called by a method, singleton modal. It could be used as the basis for a singleton modeless as well.

I agree, modal dialogs usually suck, unless very well thought through. And most modern apps are going modeless drawers, or ribbons, that are always available to the user while in context of the task at hand!

So examine your dialogs; you probably don't need half of them in your app right now...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文