- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我需要在我的应用程序中打开 network-prefpane。这适用于
[[NSWorkspace sharedWorkspace] openFile:@"/Path/To/PrefPane"];
但是如何直接打开“高级”下“网络首选项”中的“代理设置”?
您可以在“高级->代理”下的 Safari 设置中看到这一点
谢谢
最佳答案
我发现的最简单、最干净的方法是使用 Applescript。
NSAppleScript *a = [[NSAppleScript alloc] initWithSource:@"tell application \"System Preferences\"\nactivate\nset current pane to pane \"com.apple.preference.universalaccess\"\nend tell"];
[a executeAndReturnError:nil];
[a release];
将 com.apple.preference.universalaccess 替换为 Pane 的名称。 Here is a full list of preference pane names .
关于objective-c - 以编程方式打开带有部分的 PrefPane,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2042066/
我使用 Macruby 创建了一个 super 简单的示例应用程序。问题是 prefpane 不起作用,什么也没有发生。 我创建了一个按钮,它在 Main.rb 中有一个回调文件。当有人点击按钮时,标
我需要在我的应用程序中打开 network-prefpane。这适用于 [[NSWorkspace sharedWorkspace] openFile:@"/Path/To/PrefPane"]; 但
这里是其中一个首选项面板的 XUL 部分。 Bla bla bla, bla bla
长期阅读,首次参与 StackOverflow :) 免责声明我非常是 mac 开发世界的新手。 我正在尝试为已经创建的小型守护程序创建一个 prefPane。 我希望 prefPane 做两件事:
AppleScript 太慢了,所以我尝试使用 ScriptingBridge 打开 System Preferences.app 并设置当前 Pane ,这也太慢了。有更快的方法吗?适本地 最佳答案
我的项目由一个用于设置用户默认值的 PrefPane 和一个在后台运行的 HelperApp 组成。两者都通过 CFPreferences 函数访问共享首选项 plist 文件。 基本上,Helper
我正在尝试构建一个首选项 Pane ,作为学习 OS X 开发的一部分。苹果下载后preference pane example code并尝试构建项目时出现以下错误: clang:错误:无法同时指定
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
我是一名优秀的程序员,十分优秀!