“qx.Class is undefined” when loading a qooxdoo app

2019-08-10 05:07发布

When loading a qooxdoo application in source mode, I obtain the following chain of javascript errors:

qx.Class is undefined [Break on this error] qx.Class.define("qx.lang.Object", Object.js (ligne 24)

qx.Class is undefined [Break on this error] qx.Class.define("qx.lang.Type", Type.js (ligne 23)

qx.lang is undefined [Break on this error] errorToString : qx.lang.Object.select( Core.js (ligne 61)

qx.core.Property is undefined [Break on this error] qx.core.Property.attach(clazz); Class.js (ligne 1478)

qx.lang.Type is undefined [Break on this error] (qx.lang.Type.isObject(value) || typeof value === "object"); Assert.js (ligne 632)

qx.lang.Type is undefined [Break on this error] qx.lang.Type.isFunction(value) || this.__fail( Assert.js (ligne 504)

qx.lang.Type is undefined [Break on this error] qx.lang.Type.isFunction(value) || this.__fail( Assert.js (ligne 504)

qx.lang.Type is undefined [Break on this error] qx.lang.Type.isFunction(value) || this.__fail( Assert.js (ligne 504)

qx.log.Logger is undefined [Break on this error] qx.log.Logger.register(statics); Native.js (ligne 119)

qx.lang.Type is undefined [Break on this error] (qx.lang.Type.isObject(value) || typeof value === "object"); Assert.js (ligne 632)

qx.lang.Object is undefined [Break on this error] statics.FROM_CHARCODE = qx.lang.Object.invert(statics.TO_CHARCODE) String.js (ligne 447)

qx.lang.Type is undefined [Break on this error] qx.lang.Type.isString(value) || this.__fail( Assert.js (ligne 518)

qx.lang.Core is undefined [Break on this error] Stack.prototype.indexOf = qx.lang.Core.arrayIndexOf; BaseArray.js (ligne 496)

qx.log.Logger is undefined [Break on this error] qx.log.Logger.deprecatedConstantWarning( ITableModel.js (ligne 268)

qx.locale.Date is undefined [Break on this error] MONTH_YEAR_FORMAT : qx.locale.Date...teTimeFormat("yyyyMMMM", "MMMM yyyy") DateChooser.js (ligne 111)

Note that those errors have been obtained with Qooxdoo 1.0 and 1.0.1, Firefox 3.6 and Firebug 1.5.2. I tested with Internet Explorer and I obtain the same kind of javascript errors.

From my understanding, it seems that the js files are not loaded / evaluated in the right order.

Below is the order in which the js files are loaded: index.html ria.js RemoteProxy.js engine.js util.js Bootstrap.js Setting.js Engine.js __System.pageLoaded.dwr Variant.js Object.js Type.js Aspect.js Class.js

In build mode, everything works as expected.

标签: qooxdoo
2条回答
在下西门庆
2楼-- · 2019-08-10 06:08

It seems to me that the JS files are not loaded at all. Can you please check at the "Net" tab of Firebug if the files are loaded correctly.

The main difference between "source" and "build" version is the loading of the JS files. The "source" version does load every JS file/class separately to support easy debugging. The "build" version does combine all necessary classes to one JS file.

So maybe only the path to the framework is not accessible by your web server. Just a guess.

查看更多
来,给爷笑一个
3楼-- · 2019-08-10 06:13

I finaly found out where the problem come from.

For a reason I don't understand clearly, eclipse would mix up the classes from v1.0 and v1.0.1. And because the way the classes are defined changed between both versions (v1.0 use qx.Bootstrap.define and v1.0.1 use qx.Class.define), it is not compatible.

Anyway, now it is working and I will be able to play around :)

查看更多
登录 后发表回答