【发布时间】:2011-06-10 23:13:23
【问题描述】:
我正在学习 qooxdoo(顺便说一句,我认为这很棒,因为我真的理解它)。 不幸的是,在学习 twitter 客户端教程时,我在加载页面时遇到了错误。
新建类文件MainWindow.js后
qx.Class.define("twitter.MainWindow", { 扩展:qx.ui.window.Window, 构造:函数() { this.base(arguments, "Tweeter"); } });我去Application.js类文件中添加
var main = new twitter.MainWindow(); main.open();这应该让我看到小窗口。
运行后generate.py source
我在萤火虫中得到这个错误
我尝试使用 source-all 甚至 build 运行 generate.py,但无济于事。
有人可以帮我吗,我真的需要开始做这个(我浪费了两天时间尝试使用卡布奇诺和 SproutCore ......没用)
更新 我解决了这个问题。显然,我在应用程序类定义之外输入了窗口代码。在我的辩护中,教程说“将其添加到 Application.js 文件的末尾”
所以这个
qx.Class.define("twitter.Application",
{
extend : qx.application.Standalone,
members :
{
main : function()
{
// Call super class
this.base(arguments);
// Enable logging in debug variant
if (qx.core.Environment.get("qx.debug"))
{
qx.log.appender.Native;
qx.log.appender.Console;
}
}
}
});
var main = new twitter.MainWindow();
main.open();
应该是
qx.Class.define("twitter.Application",
{
extend : qx.application.Standalone,
members :
{
main : function()
{
// Call super class
this.base(arguments);
// Enable logging in debug variant
if (qx.core.Environment.get("qx.debug"))
{
qx.log.appender.Native;
qx.log.appender.Console;
}
var main = new twitter.MainWindow();
main.open();
}
}
});
【问题讨论】:
-
您是在使用手册中的教程,还是在关注相应的博客条目(在 news.qooxdoo.org 上)?
-
我使用的是手册中的教程
标签: javascript frameworks qooxdoo