打开工作表时启用与 NSWindow 的交互

发布于 2024-10-09 10:09:35 字数 255 浏览 0 评论 0原文

我正在创建一个调用工作表的应用程序,但是,在工作表打开时,与窗口的交互必须保持启用状态。这是一个模型:

http://twitpic.com/3k382o

用户必须能够使用播放和录制按钮。有谁知道如何保持其启用状态?

I'm creating an app that calls a sheet, however, the interaction with the window must stay enabled while the sheet is open. Here's a mock-up:

http://twitpic.com/3k382o

The user must be able to use the play and record buttons. Does anyone knows a way to keep it enabled?

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

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

发布评论

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

评论(2

星星的軌跡 2024-10-16 10:09:35

这似乎是一个稍微有问题的用户界面。但如果你真的想这样做,认为唯一的解决方案是:

  • 子类 NSWindow 以强制处理事件
  • 在工作表可见时运行该窗口的事件循环,并自己分派所需的事件

This seems a slightly questionable UI. But if you really want to do it, think the only solution will be to either:

  • Subclass NSWindow to force handling of the events
  • Run the event loop for that window while the sheet is visible, and dispatch desired events yourself
几度春秋 2024-10-16 10:09:35

工作表的设计目的是阻止与它们所附加的窗口的交互。如果您不希望出现这种行为,则不应使用工作表。

Sheets are intentionally designed to block interaction with the window they're attached to. If you don't want that behavior, you shouldn't be using a sheet.

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