NSApplicationPresentationOptions 不适用于 FIREBREATH
我正在尝试从我正在开发的插件中自定义用户体验,我的目标是使用 COCOA NSApplication 中可用的选项提供信息亭样式,代码如下:
// Hide the dock tile and the menu bar:
NSApplicationPresentationOptions options =
NSApplicationPresentationHideDock + NSApplicationPresentationHideMenuBar;
[NSApp setPresentationOptions:options];
我已经使用普通的可可应用程序测试了此代码,它可以工作很好,但是当我将此代码嵌入到“Firebreath PlugIn”内的函数中时,尽管 firebreath 正确构建并且我拥有的其他函数正常工作,但没有任何反应。
一些想法?这可能与系统安全限制有关?如果是这样如何启用它?如果其他可可函数工作正常,我不知道为什么这不起作用。
我正在使用 XCODE 4.2 在 Mac OS X Lion 上进行开发
I am trying to customize user experience from the plugin I am working on, my goal is to provide a kiosk style using the options available in COCOA NSApplication, the code is like following:
// Hide the dock tile and the menu bar:
NSApplicationPresentationOptions options =
NSApplicationPresentationHideDock + NSApplicationPresentationHideMenuBar;
[NSApp setPresentationOptions:options];
I have tested this code using a normal cocoa application and it works fine but when I embed this code in a function inside a "Firebreath PlugIn" nothing happens although the firebreath builds correctly and the other functions I have works normally.
some ideas? this is about system security restrictions maybe?? if so how to enable it? I don't know why this doesn't work if other cocoa functions works fine.
I am developing over Mac OS X Lion with XCODE 4.2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的猜测是,您无法访问 NSApplication,因为您处于不同的进程中;您也许可以使用新的 NSWindow 创建一个假的或类似的东西以使其工作,但由于您处于与浏览器不同的进程中,因此无法访问浏览器的 NSApp 或其他类似对象。
My guess is that you can't get tot he NSApplication because you are in a different process; you might be able to create a fake one or something like that with a new NSWindow to make it work, but since you're in a different process from the browser there is no way to access the browser's NSApp or other similar objects.