我正在尝试在 Mac OS X 中创建一个 XUL“Hello World”应用程序。我从 here 下载了 XULRunner。 , 紧随其后 this tutorial然后 this tutorial然后 this tutorial ... 没有工作。所以,我仔细看了看,发现this section ,我遵循了他的指示。不幸的是,它还不起作用。我什至可以使用命令运行应用程序
/Library/Frameworks/XUL.framework/xulrunner-bin $PWD/application.ini
但是,没有显示窗口,也没有打印错误。当我也尝试使用 firefox -app
运行应用程序时会发生这种情况。
有什么问题吗?另外,有人知道一些有用的教程吗?这也是一个可以接受的答案:)
提前致谢!
文件内容
application.ini
文件的内容是:
[App]
Vendor=Me
Name=Zull
Version=1.0
BuildID=31052011
ID=zull-xul@zull.com
[Gecko]
MinVersion=2.0
MaxVersion=2.*
chrome/chrome.manifest
的内容是:
content zull file:content/
chrome/content/main.xul
的内容是:
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="main" title="My App" width="300" height="300"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<caption label="Hello World"/>
</window>
最后,defaults/preferences/prefs.js
的内容是:
pref("toolkit.defaultChromeURI", "chrome://zull/content/main.xul");
最佳答案
我在这里只能看到一个明显的错误。 chrome.manifest 文件的内容应该是:
content zull content/
通常,您始终可以将 -jsconsole
标志添加到命令行。这将打开错误控制台,并经常向您显示错误所在。
关于javascript - 如何在 Mac OS X Snow Leopard 中运行 XUL 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6189659/