当我在源代码上运行qooxdoo生成器时,出现错误:
TypeError:'int'对象不可订阅
我的源代码导致了这个问题:
/* ************************************************************************
Copyright:
License:
Authors:
************************************************************************ */
/* ************************************************************************
#asset(first/*)
************************************************************************ */
/**
* This is the main application class of your custom application "first"
*/
qx.Class.define("first.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")) {
// support native logging capabilities, e.g. Firebug for Firefox
qx.log.appender.Native;
// support additional cross-browser console. Press F7 to toggle visibility
qx.log.appender.Console;
}
var layout = new qx.ui.layout.Grid(9, 5);
var label_f = new qx.ui.basic.Label("fahrenheit");
var label_c = new qx.ui.basic.Label("celsius");
var tf_f = new qx.ui.form.TextField();
var tf_c = new qx.ui.form.TextField();
var button_f = new qx.ui.form.Button("F->C");
var button_c = new qx.ui.form.Button("C->F");
// Document is the application root
var doc = this.getRoot();
doc.setLayout(layout);
// Add button to document at fixed coordinates
doc.add(label_f, {row: 0, column: 0});
}
}
}
);
答案 0 :(得分:2)
这是一个Python例外。你的JavaScript似乎很好,我运行没有问题。你能否做到以下几点:
./generate.py source
)?-s
(例如./generate.py -s source
- 这会打印一个python堆栈跟踪)并在此处打印输出./generate.py info
并在此处打印输出config.json
是否有效JSON你应该得到:JSON: good.