Update of /cvsroot/qooxdoo/qooxdoo/source/script/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv856/source/script/core
Modified Files:
Tag: renderer
QxApplication.js QxDebug.js QxExtend.js QxMain.js QxObject.js
Added Files:
Tag: renderer
QxSettings.js
Log Message:
Added QxSettings and QxMain namespace, moved some global storage variables to QxMain
Index: QxObject.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxObject.js,v
retrieving revision 1.2.2.40
retrieving revision 1.2.2.41
diff -u -d -r1.2.2.40 -r1.2.2.41
--- QxObject.js 3 Feb 2006 13:48:31 -0000 1.2.2.40
+++ QxObject.js 8 Feb 2006 10:37:48 -0000 1.2.2.41
@@ -30,6 +30,7 @@
#require(QxExtend)
#require(QxConst)
#require(QxUtil)
+#require(QxSettings)
#post(QxClient)
#post(QxObjectCore)
@@ -165,7 +166,7 @@
{
try
{
- this[QxSetter[prop]](propertyValues[prop]);
+ this[QxMain.setter[prop]](propertyValues[prop]);
}
catch(ex)
{
@@ -306,7 +307,7 @@
throw new Error("Attention! The value \"" + newValue + "\" is an invalid value for the property \"" + p.name + "\" which must be typeof \"" + p.type + "\" but is typeof \"" + typeof newValue + "\"!");
};
- if (p.hasInstance && !(newValue instanceof QxClasses[p.instance])) {
+ if (p.hasInstance && !(newValue instanceof QxMain.classes[p.instance])) {
throw new Error("Attention! The value \"" + newValue + "\" is an invalid value for the property \"" + p.name + "\" which must be an instance of \"" + p.instance + "\"!");
};
@@ -411,13 +412,13 @@
{
var a = this._objectproperties.split(QxConst.CORE_COMMA);
for (var i=0, l=a.length; i<l; i++) {
- delete this[QxValues[a[i]]];
+ delete this[QxMain.values[a[i]]];
};
delete this._objectproperties;
};
- if (QxEnableDebug)
+ if (QxSettings.enableDebug)
{
for (var vKey in this)
{
Index: QxApplication.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxApplication.js,v
retrieving revision 1.2.2.68
retrieving revision 1.2.2.69
diff -u -d -r1.2.2.68 -r1.2.2.69
--- QxApplication.js 3 Feb 2006 14:33:33 -0000 1.2.2.68
+++ QxApplication.js 8 Feb 2006 10:37:48 -0000 1.2.2.69
@@ -130,6 +130,8 @@
this.info("Initialization phase");
+ this._printVersion();
+
try
{
// Output the number of available classes
@@ -293,11 +295,11 @@
};
proto._printClassInfo = function() {
- this.debug("Number of classes: " + QxUtil.getObjectLength(QxClasses));
+ this.debug("Number of classes: " + QxUtil.getObjectLength(QxMain.classes));
};
proto._printPropertyInfo = function() {
- this.debug("Number of properties: " + QxPropertyCounter);
+ this.debug("Number of properties: " + QxMain.propertyNumber);
};
proto._printClientInfo = function()
@@ -309,6 +311,10 @@
};
};
+proto._printVersion = function() {
+ this.debug("Version: " + QxMain.version);
+};
+
@@ -329,10 +335,6 @@
return this._ready;
};
-proto.getVersion = function() {
- return QxVersion;
-};
-
proto.getClientWindow = function() {
return this._clientWindow;
};
Index: QxExtend.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxExtend.js,v
retrieving revision 1.7.2.110
retrieving revision 1.7.2.111
diff -u -d -r1.7.2.110 -r1.7.2.111
--- QxExtend.js 31 Jan 2006 12:27:11 -0000 1.7.2.110
+++ QxExtend.js 8 Feb 2006 10:37:48 -0000 1.7.2.111
@@ -60,7 +60,7 @@
proto.constructor = this;
// Global storage
- QxClasses[vClassName] = this;
+ QxMain.classes[vClassName] = this;
return proto;
};
@@ -402,13 +402,12 @@
var modifyKey = QxConst.INTERNAL_MODIFY + p.implMethod;
var checkKey = QxConst.INTERNAL_CHECK + p.implMethod;
- if (!QxSetter[p.name])
+ if (!QxMain.setter[p.name])
{
- QxSetter[p.name] = QxConst.INTERNAL_SET + p.method;
- QxGetter[p.name] = QxConst.INTERNAL_GET + p.method;
- QxResetter[p.name] = QxConst.INTERNAL_RESET + p.method;
-
- QxValues[p.name] = valueKey;
+ QxMain.setter[p.name] = QxConst.INTERNAL_SET + p.method;
+ QxMain.getter[p.name] = QxConst.INTERNAL_GET + p.method;
+ QxMain.resetter[p.name] = QxConst.INTERNAL_RESET + p.method;
+ QxMain.values[p.name] = valueKey;
};
// unit detection support
@@ -489,7 +488,7 @@
return this.error("Attention! The value \"" + newValue + "\" is an invalid value for the property \"" + p.name + "\" which must be typeof \"" + p.type + "\" but is typeof \"" + typeof newValue + "\"!", QxConst.INTERNAL_SET + p.method);
};
- if (p.hasInstance && !(newValue instanceof QxClasses[p.instance])) {
+ if (p.hasInstance && !(newValue instanceof QxMain.classes[p.instance])) {
return this.error("Attention! The value \"" + newValue + "\" is an invalid value for the property \"" + p.name + "\" which must be an instance of \"" + p.instance + "\"!", QxConst.INTERNAL_SET + p.method);
};
@@ -670,7 +669,7 @@
Function.prototype.addProperty = function(p)
{
- QxPropertyCounter++;
+ QxMain.propertyNumber++;
this._createProperty(p);
Index: QxMain.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxMain.js,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -u -d -r1.1.2.12 -r1.1.2.13
--- QxMain.js 3 Feb 2006 13:48:31 -0000 1.1.2.12
+++ QxMain.js 8 Feb 2006 10:37:48 -0000 1.1.2.13
@@ -29,14 +29,16 @@
************************************************************************ */
-var QxVersion = "0.2_rc2";
-var QxEnableDebug = false;
-
-var QxPropertyCounter = 0;
-var QxClasses = {};
+var QxMain =
+{
+ version : "0.2_rc2",
+ loadStart : (new Date).valueOf(),
-var QxSetter = {};
-var QxGetter = {};
-var QxResetter = {};
+ classes : {},
+ propertyNumber : 0,
-var QxValues = {};
+ setter : {},
+ getter : {},
+ resetter : {},
+ values : {}
+};
--- NEW FILE: QxSettings.js ---
/* ************************************************************************
qooxdoo - the new era of web interface development
Version:
$Id: QxSettings.js,v 1.1.2.1 2006/02/08 10:37:48 wpbasti Exp $
Copyright:
(C) 2004-2005 by Schlund + Partner AG, Germany
All rights reserved
License:
LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/
Internet:
* http://qooxdoo.oss.schlund.de
Authors:
* Sebastian Werner (wpbasti)
<sebastian dot werner at 1und1 dot de>
* Andreas Ecker (aecker)
<andreas dot ecker at 1und1 dot de>
************************************************************************ */
/* ************************************************************************
#package(core)
************************************************************************ */
var QxSettings =
{
enableDebug : false,
applicationLayout : true
};
Index: QxDebug.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxDebug.js,v
retrieving revision 1.1.2.23
retrieving revision 1.1.2.24
diff -u -d -r1.1.2.23 -r1.1.2.24
--- QxDebug.js 17 Jan 2006 16:15:52 -0000 1.1.2.23
+++ QxDebug.js 8 Feb 2006 10:37:48 -0000 1.1.2.24
@@ -32,7 +32,7 @@
function QxDebug(group, message, classname)
{
// Building time string
- var t = String((new Date).valueOf()-window._htmlstart);
+ var t = String((new Date).valueOf()-QxMain.loadStart);
while (t.length<6) t = QxDebug.fill + t;
t += QxDebug.divider;
@@ -168,30 +168,3 @@
QxDebug.messageClass = "message message-";
QxDebug.tag = QxConst.CORE_DIV;
QxDebug.undefined = QxConst.TYPEOF_UNDEFINED;
-
-function printInitMessage()
-{
- var d = new Date;
-
- var y = d.getFullYear();
- var m = d.getMonth()+1;
- var d = d.getDate();
-
- if (m<10) {
- m = QxConst.CORE_ZERO + m;
- };
-
- if (d<10) {
- d = QxConst.CORE_ZERO + d;
- };
-
- var e = y.toString() + m.toString() + d.toString();
-
- QxDebug("QxInit", "qooxdoo/" + QxVersion, "info");
-
- // Attention: This line will be changed by the build process
- QxDebug("QxInit", "datestamp/" + e, "info");
-};
-
-printInitMessage();
-
|