現在、qooxdooライブラリを使用してRIAアプリを開発しています。
qooxdooのパーツローダーを使用しているときにエラーが発生しました。
これは私のApplication.jsです:
/* ************************************************************************
#asset(crmv2/*)
************************************************************************ */
qx.Class.define("crmv2.Application",
{
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;
}
/*
-------------------------------------------------------------------------
Below is your actual application code...
-------------------------------------------------------------------------
*/
/*
-------------------------------------------------------------------------
USE AN EXISTING NODE TO ADD WIDGETS INTO THE PAGE LAYOUT FLOW
-------------------------------------------------------------------------
*/
// Hint: the second and the third parameter control if the dimensions
// of the element should be respected or not.
var htmlElement = document.getElementById("isle");
var inlineIsle = new qx.ui.root.Inline(htmlElement, true, true);
// use VBox layout instead of basic
inlineIsle.setLayout(new qx.ui.layout.VBox);
// new container
var container = new qx.ui.container.Composite(new qx.ui.layout.HBox);
// Create a button
var button1 = new qx.ui.form.Button("First Button", "crmv2/test.png");
button1.setAllowStretchY(false);
container.add(button1);
container.setPadding(10);
// spacer
var spacer = new qx.ui.core.Spacer();
container.add(spacer, { flex: 1 });
// create a date chooser component
var dateChooser = new qx.ui.control.DateChooser;
container.add(dateChooser);
// add container to the inline root
inlineIsle.add(container);
// Add an event listener
button1.addListener("execute", function(e) {
qx.io.PartLoader.require(
["testpart"],
function()
{
this.__MainWindow = new crmv2.MainWindow();
//this.getRoot().add(this.__MainWindow);
// open the window
this.__MainWindow.center();
this.__MainWindow.open();
},
this);
var main = new crmv2.MainWindow();
main.open();
});
/*
-------------------------------------------------------------------------
ADD WIDGETS WITH ABSOLUTE POSITIONING
-------------------------------------------------------------------------
*/
// Create a button
var button2 = new qx.ui.form.Button("absolutely positioned");
// Add button to document at fixed coordinates
this.getRoot().add(button2, {left: 500, top: 310});
// Add an event listener
button2.addListener("execute", function(e) {
alert("I'm an absolutely positioned button!\n" +
"I overlay existing content.");
});
}
}
});
MainWindow.js
qx.Class.define("crmv2.MainWindow",
{
extend : qx.ui.window.Window,
construct : function()
{
this.base(arguments, "crmv2");
}
});
confi.json
{
"name" : "crmv2",
"include" :
[{
"path" : "${QOOXDOO_PATH}/tool/data/config/application.json"
}
],
"export" :
[
"api",
"api-data",
"build",
"clean",
"distclean",
"fix",
"info",
"inspector",
"lint",
"migration",
"pretty",
"profiling",
"source",
"source-all",
"source-hybrid",
"simulation-build",
"simulation-run",
"test",
"test-source",
"translation"
],
"default-job" : "source-hybrid",
"let" :{
"APPLICATION" : "crmv2",
"QOOXDOO_PATH" : "../../..",
"QXTHEME" : "crmv2.theme.Theme",
"API_EXCLUDE" : ["qx.test.*", "${APPLICATION}.theme.*", "${APPLICATION}.test.*", "${APPLICATION}.simulation.*"],
"LOCALES" : [ "en" ],
"CACHE" : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache",
"ROOT" : "."
},
// You only need to edit the remainder of this file, if you want to customize
// specific jobs, or add own job definitions.
"jobs" :
{
"source":
{
"packages" :
{
"parts" :
{
"boot" :
{
"include" : [ "${QXTHEME}", "crmv2.Application" ]
},
"testpart" :
{
"include" : [ "crmv2.MainWindow" ]
}
}
}
}
// Uncomment the following entry to add a contrib or library to your
// project; make sure to adapt the path to the Manifest.json; if you are
// using a contrib: library, it will be downloaded into the path specified
// by the 'cache/downloads' config key
/*
"libraries" :
{
"library" :
[
{
"manifest" : "contrib://SkeletonApplication/trunk/Manifest.json"
}
]
}
*/
// If you want to tweak a job setting, see the following sample where
// the "format" feature of the "build-script" job is overridden.
// To see a list of available jobs, invoke 'generate.py x'.
/*
,"build-script" :
{
"compile-options" :
{
"code" :
{
"format" : false
}
}
}
*/
}
}
FIRBUGコンソールでこのエラーが発生しました:
TypeError:parts[i]は未定義
のparts[i] .load(onLoad、this);です。
誰かが私に何が悪いのか教えてもらえますか?
前もって感謝します。