我正在玩和测试qooxdo-compiler,如何用part编译?
我有这个脚本,但它在Window或Linux中不起作用。
/*
*
* @use(webApp.EmptyWindow)
*/
qx.Class.define("webApp.Application", {
extend : qx.application.Standalone,
members : {
main : function() {
this.base(arguments);
if (qx.core.Environment.get("qx.debug")) {
qx.log.appender.Native;
qx.log.appender.Console;
}
var button1 = new qx.ui.form.Button("Click me");
var doc = this.getRoot();
doc.add(button1);
button1.addListener("execute", function() {
// this work.!!!
//var emptyWindow = webApp.EmptyWindow.getInstance();
//emptyWindow.open();
// NO WORK.!
var sfile = "webApp.EmptyWindow";
qx.io.PartLoader.require(sfile, function () {
var miWin = qx.Class.getByName(sfile).getInstance();
miWin.open();
});
});
}
}
});
qx.Class.define("webApp.EmptyWindow", {
extend: qx.ui.window.Window,
type: 'singleton',
construct: function () {
this.base(arguments, 'TestOne');
this.set({modal: true});
}
});
{
"targets": [
{
"type": "source",
"outputPath": "source-output"
},
{
"type": "hybrid",
"outputPath": "hybrid-output"
},
{
"type": "build",
"outputPath": "build-output"
}
],
"defaultTarget": "source",
"locales": ["en"],
"applications": [
{
"class": "webApp.Application",
"theme": "webApp.theme.Theme",
"name": "webApp",
"boot": "source/boot",
"parts": {
"boot": {
"include": [ "webApp.Application", "webApp.theme.Theme" ],
"exclude": []
},
"addClazz": {
"include": [ "webApp.EmptyWindow" ]
}
}
}
],
"libraries": [
"../qooxdoo-master/framework",
"."
]
}
错误是:
未捕获错误:部件中未找到“webApp.EmptyWindow”部分(boot,addClazz)
有什么问题?