Cocoa:状态栏中的 NSPopover 无响应
应用程序有一个 NSPopover,在状态栏和一些窗口中包含一些用户输入。窗口工作正常,但当我在状态栏中打开弹出窗口时,它会打开为非活动状态。我可以看到一切,但都是灰色的,就像背景窗口一样。我一直在尝试在 activate、activateignoringotherapps、makekeyandorderfront 等方面找到的所有方法,但这些都没有效果。如何将焦点转移到状态栏弹出窗口?
我还在窗口中创建了一个按钮,显示相同的弹出窗口,以确保它正常工作,当从窗口按钮调用时,它从那里完美工作。然后我单击状态栏,它从那里打开,但处于非活动状态。
感谢您的帮助。
An application has an NSPopover with some user inputs in the status bar and some windows. The windows work fine but when I open the popover in the status bar it opens inactive. I can see everything but it's all greyed out, like it's a background window. I've been trying everything I can find on activate, activateignoringotherapps, makekeyandorderfront, etc but none of these is having an effect. How can I shift the focus to the statusbar popover?
I also made a button in the window that showed the same popup to make sure it is working, when called from the window button it works perfectly from there. Then I click on the status bar, and it opens from there instead, but inactive.
Thanks for the help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了同样的问题,但还没有找到解决方案。不幸的是,我相信这是一个错误: http://www.openradar.me/radar?id= 1226415
I've run into the same problem and haven't found a solution. Unfortunately, I believe this is a bug: http://www.openradar.me/radar?id=1226415
有一个名为 SFBPopovers 的框架,它提供类似的功能并且可以与菜单栏配合良好。
它可能对您的问题有所帮助。
There's a framework called SFBPopovers which provides similar functionality and works fine with the menu bar.
It might help with your issue.