qooxdoo-commit Mailing List for qooxdoo (Page 1428)
Brought to you by:
ecker,
martinwittemann
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(453) |
Feb
(800) |
Mar
(247) |
Apr
(324) |
May
(172) |
Jun
(145) |
Jul
(265) |
Aug
(447) |
Sep
(271) |
Oct
(312) |
Nov
(327) |
Dec
(472) |
| 2007 |
Jan
(493) |
Feb
(631) |
Mar
(565) |
Apr
(469) |
May
(757) |
Jun
(460) |
Jul
(440) |
Aug
(411) |
Sep
(813) |
Oct
(339) |
Nov
(112) |
Dec
(215) |
| 2008 |
Jan
(423) |
Feb
(671) |
Mar
(578) |
Apr
(566) |
May
(498) |
Jun
(411) |
Jul
(845) |
Aug
(1208) |
Sep
(176) |
Oct
(144) |
Nov
(216) |
Dec
(353) |
| 2009 |
Jan
(363) |
Feb
(700) |
Mar
(416) |
Apr
(362) |
May
(292) |
Jun
(238) |
Jul
(243) |
Aug
(216) |
Sep
(287) |
Oct
(304) |
Nov
(300) |
Dec
(416) |
| 2010 |
Jan
(200) |
Feb
(200) |
Mar
(183) |
Apr
(259) |
May
(217) |
Jun
(241) |
Jul
(320) |
Aug
(330) |
Sep
(209) |
Oct
(217) |
Nov
(460) |
Dec
(392) |
| 2011 |
Jan
(338) |
Feb
(465) |
Mar
(1257) |
Apr
(433) |
May
(505) |
Jun
(417) |
Jul
(438) |
Aug
(241) |
Sep
(258) |
Oct
(223) |
Nov
(224) |
Dec
(172) |
| 2012 |
Jan
(151) |
Feb
(119) |
Mar
(220) |
Apr
(182) |
May
(236) |
Jun
(264) |
Jul
(188) |
Aug
(145) |
Sep
(186) |
Oct
(183) |
Nov
(243) |
Dec
(126) |
| 2013 |
Jan
(133) |
Feb
(165) |
Mar
(122) |
Apr
(116) |
May
(177) |
Jun
(177) |
Jul
(290) |
Aug
(150) |
Sep
(165) |
Oct
(168) |
Nov
(252) |
Dec
(152) |
| 2014 |
Jan
(109) |
Feb
(150) |
Mar
(135) |
Apr
(186) |
May
(235) |
Jun
(181) |
Jul
(193) |
Aug
(117) |
Sep
(118) |
Oct
(194) |
Nov
(207) |
Dec
(261) |
| 2015 |
Jan
(138) |
Feb
(218) |
Mar
(180) |
Apr
(141) |
May
(114) |
Jun
(24) |
Jul
(22) |
Aug
(14) |
Sep
(22) |
Oct
(11) |
Nov
(7) |
Dec
(10) |
| 2016 |
Jan
(1) |
Feb
(31) |
Mar
(13) |
Apr
(30) |
May
(34) |
Jun
(25) |
Jul
(16) |
Aug
(14) |
Sep
(21) |
Oct
(20) |
Nov
(6) |
Dec
|
|
From: Sebastian W. <wp...@us...> - 2006-01-23 14:50:50
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30234 Modified Files: Tag: renderer QxExtend.js Log Message: Back to old version because new one was dramatically slower Index: QxExtend.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxExtend.js,v retrieving revision 1.7.2.102 retrieving revision 1.7.2.103 diff -u -d -r1.7.2.102 -r1.7.2.103 --- QxExtend.js 23 Jan 2006 13:28:25 -0000 1.7.2.102 +++ QxExtend.js 23 Jan 2006 14:50:42 -0000 1.7.2.103 @@ -316,153 +316,6 @@ pp[QxConst.INTERNAL_SETDEFAULT + p.method] = null; }; - - - - - - -var QxProperties = -{ - advancedCheck : function(newValue, p) - { - if (!(newValue == null && p.allowNull)) - { - if (p.hasType && typeof newValue != p.type) { - 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])) { - 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); - }; - - if (p.hasClassName && newValue.classname != p.classname) { - return this.error("Attention! The value \"" + newValue + "\" is an invalid value for the property \"" + p.name + "\" which must be an object with the classname \"" + p.classname + "\"!", QxConst.INTERNAL_SET + p.method); - }; - - if (p.hasPossibleValues && newValue != null && !p.possibleValues.contains(newValue)) { - return this.error("Failed to save value for " + p.name + ". '" + newValue + "' is not a possible value!", QxConst.INTERNAL_SET + p.method); - }; - }; - }, - - userCheck : function(checkKey, newValue, oldValue, p) - { - // Allow to check and transform the new value before storage - if (typeof this[checkKey] == QxConst.TYPEOF_FUNCTION) - { - try - { - return this[checkKey](newValue, p); - } - catch(ex) - { - return this.error("Failed to check property " + p.name + ": " + ex, checkKey); - }; - }; - - return newValue; - }, - - storeValue : function(valueKey, modifyKey, newValue, oldValue, p) - { - // Store new value - this[valueKey] = newValue; - - // Check if there is a modifier implementation - if (typeof this[modifyKey] == QxConst.TYPEOF_FUNCTION) - { - try - { - var r = this[modifyKey](newValue, oldValue, p); - if (!r) { - return this.error("Modification of property \"" + p.name + "\" failed without exception (" + r + ")", modifyKey); - }; - } - catch(ex) - { - return this.error("Modification of property \"" + p.name + "\" failed with exception (" + ex + ")", modifyKey); - }; - }; - }, - - unitDetection : function(unitDetectionKey, newValue, p) - { - // Unit detection support - if (p.hasUnitDetection) { - this[unitDetectionKey](p, newValue); - }; - }, - - queueAdd : function(p) - { - // Auto queue addition support - if (p.addToQueue) { - this.addToQueue(p.name); - } - else if (p.addToQueueRuntime) { - this.addToQueueRuntime(p.name); - }; - - // Auto state queue addition support - if (p.addToStateQueue) { - this._addToGlobalStateQueue(); - }; - }, - - eventDispatch : function(changeKey, newValue, oldValue, p) - { - // Create Event - if (this instanceof QxTarget && this.hasEventListeners(changeKey)) - { - var ce = new QxDataEvent(changeKey, newValue, oldValue, false); - - ce.setTarget(this); - - try - { - this.dispatchEvent(ce, true); - } - catch(ex) - { - throw new Error("Property " + p.name + " modified: Failed to dispatch change event: " + ex); - }; - }; - }, - - applyConvert : function(newValue, p) - { - // support converter methods - if (p.hasConvert) - { - try - { - return p.convert.call(this, newValue, p); - } - catch(ex) - { - throw new Error("Attention! Could not convert new value for " + p.name + ": " + newValue + ": " + ex); - }; - }; - - return newValue; - }, - - multipleArguments : function(args, p) - { - // convert multiple arguments to array - if (p.allowMultipleArguments && args.length > 1) { - return QxUtil.convertArgumentsToArray(args); - }; - - return args[0]; - } -}; - - - - - Function.prototype._createProperty = function(p) { if(typeof p != QxConst.TYPEOF_OBJECT) { @@ -540,42 +393,11 @@ // apply default value pp[valueKey] = p.defaultValue; - - - - // building getFoo(): Returns current stored value pp[QxConst.INTERNAL_GET + p.method] = function() { return this[valueKey]; }; - // building setFoo(): Setup new value, do type and change detection, converting types, call unit detection, ... - pp[QxConst.INTERNAL_SET + p.method] = function(newValue) - { - var oldValue = this[valueKey]; - - newValue = QxProperties.multipleArguments.call(this, arguments, p); - newValue = QxProperties.applyConvert.call(this, newValue, p); - - if (newValue == oldValue) { - return newValue; - }; - - QxProperties.advancedCheck.call(this, newValue, p); - - newValue = QxProperties.userCheck.call(this, checkKey, newValue, oldValue, p); - - QxProperties.storeValue.call(this, valueKey, modifyKey, newValue, oldValue, p); - QxProperties.unitDetection.call(this, unitDetectionKey, newValue, p); - QxProperties.queueAdd.call(this, p); - QxProperties.eventDispatch.call(this, changeKey, newValue, oldValue, p); - - return newValue; - }; - - - - // building forceFoo(): Set (override) without do anything else pp[QxConst.INTERNAL_FORCE + p.method] = function(newValue) { return this[valueKey] = newValue; @@ -592,9 +414,130 @@ pp[QxConst.INTERNAL_TOGGLE + p.method] = function(newValue) { return this[QxConst.INTERNAL_SET + p.method](!this[valueKey]); }; - }; - - + }; + + // building setFoo(): Setup new value, do type and change detection, converting types, call unit detection, ... + pp[QxConst.INTERNAL_SET + p.method] = function(newValue) + { + // convert multiple arguments to array + if (p.allowMultipleArguments && arguments.length > 1) { + newValue = QxUtil.convertArgumentsToArray(arguments); + }; + + // support converter methods + if (p.hasConvert) + { + try + { + newValue = p.convert.call(this, newValue, p); + } + catch(ex) + { + throw new Error("Attention! Could not convert new value for " + p.name + ": " + newValue + ": " + ex); + }; + }; + + var oldValue = this[valueKey]; + + if (newValue == oldValue) { + return newValue; + }; + + if (!(newValue == null && p.allowNull)) + { + if (p.hasType && typeof newValue != p.type) { + 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])) { + 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); + }; + + if (p.hasClassName && newValue.classname != p.classname) { + return this.error("Attention! The value \"" + newValue + "\" is an invalid value for the property \"" + p.name + "\" which must be an object with the classname \"" + p.classname + "\"!", QxConst.INTERNAL_SET + p.method); + }; + + if (p.hasPossibleValues && newValue != null && !p.possibleValues.contains(newValue)) { + return this.error("Failed to save value for " + p.name + ". '" + newValue + "' is not a possible value!", QxConst.INTERNAL_SET + p.method); + }; + }; + + // Allow to check and transform the new value before storage + if (typeof this[checkKey] == QxConst.TYPEOF_FUNCTION) + { + try + { + newValue = this[checkKey](newValue, p); + + // Don't do anything if new value is indentical to old value + if (newValue == oldValue) { + return newValue; + }; + } + catch(ex) + { + return this.error("Failed to check property " + p.name + ": " + ex, checkKey); + }; + }; + + // Store new value + this[valueKey] = newValue; + + // Check if there is a modifier implementation + if (typeof this[modifyKey] == QxConst.TYPEOF_FUNCTION) + { + try + { + var r = this[modifyKey](newValue, oldValue, p); + if (!r) { + return this.error("Modification of property \"" + p.name + "\" failed without exception (" + r + ")", modifyKey); + }; + } + catch(ex) + { + return this.error("Modification of property \"" + p.name + "\" failed with exception (" + ex + ")", modifyKey); + }; + }; + + // Unit detection support + if (p.hasUnitDetection) { + this[unitDetectionKey](p, newValue); + }; + + // Auto queue addition support + if (p.addToQueue) { + this.addToQueue(p.name); + } + else if (p.addToQueueRuntime) { + this.addToQueueRuntime(p.name); + }; + + // Auto state queue addition support + if (p.addToStateQueue) { + this._addToGlobalStateQueue(); + }; + + // Create Event + if (this instanceof QxTarget && this.hasEventListeners(changeKey)) + { + var ce = new QxDataEvent(changeKey, newValue, oldValue, false); + + ce.setTarget(this); + + try + { + this.dispatchEvent(ce, true); + } + catch(ex) + { + throw new Error("Property " + p.name + " modified: Failed to dispatch change event: " + ex); + }; + + ce = null; + }; + + return newValue; + }; // building user configured get alias for property if (typeof p.getAlias == QxConst.TYPEOF_STRING) { |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 13:28:38
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31017/source/script/core Modified Files: Tag: renderer QxExtend.js Log Message: Initial split out of property setters Index: QxExtend.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxExtend.js,v retrieving revision 1.7.2.101 retrieving revision 1.7.2.102 diff -u -d -r1.7.2.101 -r1.7.2.102 --- QxExtend.js 23 Jan 2006 12:45:35 -0000 1.7.2.101 +++ QxExtend.js 23 Jan 2006 13:28:25 -0000 1.7.2.102 @@ -316,6 +316,153 @@ pp[QxConst.INTERNAL_SETDEFAULT + p.method] = null; }; + + + + + + +var QxProperties = +{ + advancedCheck : function(newValue, p) + { + if (!(newValue == null && p.allowNull)) + { + if (p.hasType && typeof newValue != p.type) { + 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])) { + 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); + }; + + if (p.hasClassName && newValue.classname != p.classname) { + return this.error("Attention! The value \"" + newValue + "\" is an invalid value for the property \"" + p.name + "\" which must be an object with the classname \"" + p.classname + "\"!", QxConst.INTERNAL_SET + p.method); + }; + + if (p.hasPossibleValues && newValue != null && !p.possibleValues.contains(newValue)) { + return this.error("Failed to save value for " + p.name + ". '" + newValue + "' is not a possible value!", QxConst.INTERNAL_SET + p.method); + }; + }; + }, + + userCheck : function(checkKey, newValue, oldValue, p) + { + // Allow to check and transform the new value before storage + if (typeof this[checkKey] == QxConst.TYPEOF_FUNCTION) + { + try + { + return this[checkKey](newValue, p); + } + catch(ex) + { + return this.error("Failed to check property " + p.name + ": " + ex, checkKey); + }; + }; + + return newValue; + }, + + storeValue : function(valueKey, modifyKey, newValue, oldValue, p) + { + // Store new value + this[valueKey] = newValue; + + // Check if there is a modifier implementation + if (typeof this[modifyKey] == QxConst.TYPEOF_FUNCTION) + { + try + { + var r = this[modifyKey](newValue, oldValue, p); + if (!r) { + return this.error("Modification of property \"" + p.name + "\" failed without exception (" + r + ")", modifyKey); + }; + } + catch(ex) + { + return this.error("Modification of property \"" + p.name + "\" failed with exception (" + ex + ")", modifyKey); + }; + }; + }, + + unitDetection : function(unitDetectionKey, newValue, p) + { + // Unit detection support + if (p.hasUnitDetection) { + this[unitDetectionKey](p, newValue); + }; + }, + + queueAdd : function(p) + { + // Auto queue addition support + if (p.addToQueue) { + this.addToQueue(p.name); + } + else if (p.addToQueueRuntime) { + this.addToQueueRuntime(p.name); + }; + + // Auto state queue addition support + if (p.addToStateQueue) { + this._addToGlobalStateQueue(); + }; + }, + + eventDispatch : function(changeKey, newValue, oldValue, p) + { + // Create Event + if (this instanceof QxTarget && this.hasEventListeners(changeKey)) + { + var ce = new QxDataEvent(changeKey, newValue, oldValue, false); + + ce.setTarget(this); + + try + { + this.dispatchEvent(ce, true); + } + catch(ex) + { + throw new Error("Property " + p.name + " modified: Failed to dispatch change event: " + ex); + }; + }; + }, + + applyConvert : function(newValue, p) + { + // support converter methods + if (p.hasConvert) + { + try + { + return p.convert.call(this, newValue, p); + } + catch(ex) + { + throw new Error("Attention! Could not convert new value for " + p.name + ": " + newValue + ": " + ex); + }; + }; + + return newValue; + }, + + multipleArguments : function(args, p) + { + // convert multiple arguments to array + if (p.allowMultipleArguments && args.length > 1) { + return QxUtil.convertArgumentsToArray(args); + }; + + return args[0]; + } +}; + + + + + Function.prototype._createProperty = function(p) { if(typeof p != QxConst.TYPEOF_OBJECT) { @@ -393,11 +540,42 @@ // apply default value pp[valueKey] = p.defaultValue; + + + + // building getFoo(): Returns current stored value pp[QxConst.INTERNAL_GET + p.method] = function() { return this[valueKey]; }; + // building setFoo(): Setup new value, do type and change detection, converting types, call unit detection, ... + pp[QxConst.INTERNAL_SET + p.method] = function(newValue) + { + var oldValue = this[valueKey]; + + newValue = QxProperties.multipleArguments.call(this, arguments, p); + newValue = QxProperties.applyConvert.call(this, newValue, p); + + if (newValue == oldValue) { + return newValue; + }; + + QxProperties.advancedCheck.call(this, newValue, p); + + newValue = QxProperties.userCheck.call(this, checkKey, newValue, oldValue, p); + + QxProperties.storeValue.call(this, valueKey, modifyKey, newValue, oldValue, p); + QxProperties.unitDetection.call(this, unitDetectionKey, newValue, p); + QxProperties.queueAdd.call(this, p); + QxProperties.eventDispatch.call(this, changeKey, newValue, oldValue, p); + + return newValue; + }; + + + + // building forceFoo(): Set (override) without do anything else pp[QxConst.INTERNAL_FORCE + p.method] = function(newValue) { return this[valueKey] = newValue; @@ -414,130 +592,9 @@ pp[QxConst.INTERNAL_TOGGLE + p.method] = function(newValue) { return this[QxConst.INTERNAL_SET + p.method](!this[valueKey]); }; - }; - - // building setFoo(): Setup new value, do type and change detection, converting types, call unit detection, ... - pp[QxConst.INTERNAL_SET + p.method] = function(newValue) - { - // convert multiple arguments to array - if (p.allowMultipleArguments && arguments.length > 1) { - newValue = QxUtil.convertArgumentsToArray(arguments); - }; - - // support converter methods - if (p.hasConvert) - { - try - { - newValue = p.convert.call(this, newValue, p); - } - catch(ex) - { - throw new Error("Attention! Could not convert new value for " + p.name + ": " + newValue + ": " + ex); - }; - }; - - var oldValue = this[valueKey]; - - if (newValue == oldValue) { - return newValue; - }; - - if (!(newValue == null && p.allowNull)) - { - if (p.hasType && typeof newValue != p.type) { - 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])) { - 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); - }; - - if (p.hasClassName && newValue.classname != p.classname) { - return this.error("Attention! The value \"" + newValue + "\" is an invalid value for the property \"" + p.name + "\" which must be an object with the classname \"" + p.classname + "\"!", QxConst.INTERNAL_SET + p.method); - }; - - if (p.hasPossibleValues && newValue != null && !p.possibleValues.contains(newValue)) { - return this.error("Failed to save value for " + p.name + ". '" + newValue + "' is not a possible value!", QxConst.INTERNAL_SET + p.method); - }; - }; - - // Allow to check and transform the new value before storage - if (typeof this[checkKey] == QxConst.TYPEOF_FUNCTION) - { - try - { - newValue = this[checkKey](newValue, p); - - // Don't do anything if new value is indentical to old value - if (newValue == oldValue) { - return newValue; - }; - } - catch(ex) - { - return this.error("Failed to check property " + p.name + ": " + ex, checkKey); - }; - }; - - // Store new value - this[valueKey] = newValue; - - // Check if there is a modifier implementation - if (typeof this[modifyKey] == QxConst.TYPEOF_FUNCTION) - { - try - { - var r = this[modifyKey](newValue, oldValue, p); - if (!r) { - return this.error("Modification of property \"" + p.name + "\" failed without exception (" + r + ")", modifyKey); - }; - } - catch(ex) - { - return this.error("Modification of property \"" + p.name + "\" failed with exception (" + ex + ")", modifyKey); - }; - }; - - // Unit detection support - if (p.hasUnitDetection) { - this[unitDetectionKey](p, newValue); - }; - - // Auto queue addition support - if (p.addToQueue) { - this.addToQueue(p.name); - } - else if (p.addToQueueRuntime) { - this.addToQueueRuntime(p.name); - }; - - // Auto state queue addition support - if (p.addToStateQueue) { - this._addToGlobalStateQueue(); - }; - - // Create Event - if (this instanceof QxTarget && this.hasEventListeners(changeKey)) - { - var ce = new QxDataEvent(changeKey, newValue, oldValue, false); - - ce.setTarget(this); - - try - { - this.dispatchEvent(ce, true); - } - catch(ex) - { - throw new Error("Property " + p.name + " modified: Failed to dispatch change event: " + ex); - }; - - ce = null; - }; - - return newValue; - }; + }; + + // building user configured get alias for property if (typeof p.getAlias == QxConst.TYPEOF_STRING) { |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 13:28:37
|
Update of /cvsroot/qooxdoo/qooxdoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31017 Modified Files: Tag: renderer TODO Log Message: Initial split out of property setters Index: TODO =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/TODO,v retrieving revision 1.1.2.46 retrieving revision 1.1.2.47 diff -u -d -r1.1.2.46 -r1.1.2.47 --- TODO 23 Jan 2006 12:28:53 -0000 1.1.2.46 +++ TODO 23 Jan 2006 13:28:25 -0000 1.1.2.47 @@ -5,6 +5,10 @@ * isDisplayed vs. isDisplayable (cleanups naming) * Optimize addProperty, use multiple functions for setters which themselves only call submethods and send the "p" variable to the handlers. Build setters which only do the stuff, which is needed for this property. Try to remove these "hasXXX" stuff. + - 40% done + +* Additional Namespace for QxSetter, QxGetter, QxResetter? + * Optimize unit detection and unit handling and storage for dimension and location properties. Try to remove all these boolean flags. * Rework and cleanup disposer code - do we really need to dispose all this stuff? |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 12:45:44
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13790/source/script/core Modified Files: Tag: renderer QxExtend.js Log Message: Minor cleanup Index: QxExtend.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxExtend.js,v retrieving revision 1.7.2.100 retrieving revision 1.7.2.101 diff -u -d -r1.7.2.100 -r1.7.2.101 --- QxExtend.js 16 Jan 2006 16:11:55 -0000 1.7.2.100 +++ QxExtend.js 23 Jan 2006 12:45:35 -0000 1.7.2.101 @@ -49,11 +49,9 @@ throw new Error("Extend: Missing or malformed className: " + vClassName); }; - proto = null; - // build helper function // this omits the initial constructor call while inherit properties - var f = new Function(); + var f = new Function; f.prototype = vSuper.prototype; proto = this.prototype = new f; |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 12:44:19
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13344/source/script/core Added Files: Tag: renderer QxObjectCore.js Log Message: Improved code and structure of QxObject, some cleanups --- NEW FILE: QxObjectCore.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxObjectCore.js,v 1.1.2.1 2006/01/23 12:44:05 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) #require(QxObject) ************************************************************************ */ var QxObjectCounter = 0; var QxObjectDataBase = []; QxObject.toHashCode = function(o) { if(o._hashCode != null) { return o._hashCode; }; return o._hashCode = QxObjectCounter++; }; QxObject.dispose = function() { for (var i=QxObjectDataBase.length-1; i>=0; i--) { if (typeof QxObjectDataBase[i] != QxConst.TYPEOF_UNDEFINED) { QxObjectDataBase[i].dispose(); if (typeof QxObjectDataBase == QxConst.TYPEOF_UNDEFINED) { break; }; delete QxObjectDataBase[i]; }; }; delete QxObjectDataBase; }; QxObject.addProperty({ name : "enabled", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true, getAlias : "isEnabled" }); QxObject.DEBUG_MSG_BEFORE = "[HASHCODE:"; QxObject.DEBUG_MSG_AFTER = "]"; QxObject.DEBUG_FUNCERRORPRE = "Failed to execute \""; QxObject.DEBUG_FUNCERRORPOST = "()\": "; |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 12:43:55
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13188/source/script/gui Modified Files: Tag: renderer QxWidget.js Log Message: Improved code and structure of QxObject, some cleanups Index: QxWidget.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/gui/Attic/QxWidget.js,v retrieving revision 1.1.2.49 retrieving revision 1.1.2.50 diff -u -d -r1.1.2.49 -r1.1.2.50 --- QxWidget.js 22 Jan 2006 17:58:32 -0000 1.1.2.49 +++ QxWidget.js 23 Jan 2006 12:43:47 -0000 1.1.2.50 @@ -2987,8 +2987,6 @@ proto._modifyEnabled = function(propValue, propOldValue, propData) { - QxTarget.prototype._modifyEnabled.call(this, propValue, propOldValue, propData); - this.setEnabledState(propValue ? QxConst.STATE_ENABLED : QxConst.STATE_DISABLED); return true; }; |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 12:43:55
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13188/source/script/core Modified Files: Tag: renderer QxObject.js QxTimer.js Log Message: Improved code and structure of QxObject, some cleanups Index: QxObject.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxObject.js,v retrieving revision 1.2.2.34 retrieving revision 1.2.2.35 diff -u -d -r1.2.2.34 -r1.2.2.35 --- QxObject.js 16 Jan 2006 16:11:55 -0000 1.2.2.34 +++ QxObject.js 23 Jan 2006 12:43:46 -0000 1.2.2.35 @@ -26,11 +26,10 @@ /* ************************************************************************ #package(core) -#require(QxNative) #require(QxExtend) -#require(QxClient) -#require(QxMain) +#require(QxConst) #require(QxUtil) +#post(QxObjectCore) ************************************************************************ */ @@ -51,43 +50,41 @@ QxObject.extend(Object, "QxObject"); -var QxObjectCounter = 0; -var QxObjectDataBase = []; -QxObject.toHashCode = function(o) + + + +/* +--------------------------------------------------------------------------- + UTILITIES +--------------------------------------------------------------------------- +*/ + +proto.toString = function() { - if(o._hashCode != null) { - return o._hashCode; + if(this.classname) { + return "[object " + this.classname + "]"; }; - return o._hashCode = QxObjectCounter++; + return "[object Object]"; }; -QxObject.dispose = function() -{ - for (var i=QxObjectDataBase.length-1; i>=0; i--) - { - if (typeof QxObjectDataBase[i] != QxConst.TYPEOF_UNDEFINED) - { - QxObjectDataBase[i].dispose(); +proto.toHashCode = function() { + return this._hashCode; +}; - if (typeof QxObjectDataBase == QxConst.TYPEOF_UNDEFINED) { - break; - }; - delete QxObjectDataBase[i]; - }; - }; - delete QxObjectDataBase; -}; -QxObject.addProperty({ name : "enabled", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true, getAlias : "isEnabled" }); -QxObject.DEBUG_MSG_BEFORE = "[HASHCODE:"; -QxObject.DEBUG_MSG_AFTER = "]"; -QxObject.DEBUG_FUNCERRORPRE = "Failed to execute \""; -QxObject.DEBUG_FUNCERRORPOST = "()\": "; + + + +/* +--------------------------------------------------------------------------- + DEBUGGING INTERFACE +--------------------------------------------------------------------------- +*/ proto.debug = function(m, c) { QxDebug(this.classname + QxObject.DEBUG_MSG_BEFORE + this._hashCode + QxObject.DEBUG_MSG_AFTER, m, c); @@ -113,61 +110,16 @@ }; }; -proto.toString = function() -{ - if(this.classname) { - return "[object " + this.classname + "]"; - }; - - return "[object Object]"; -}; - -proto.toHashCode = function() { - return this._hashCode; -}; - -proto._modifyEnabled = function(propValue, propOldValue, propData) { - return true; -}; -proto._disposed = false; -/*! - Dispose this object -*/ -proto.dispose = function() -{ - if (this.getDisposed()) { - return; - }; - if (this._data) - { - for(var p in this._data) { - delete this._data[p]; - }; - delete this._data; - }; - this._disposed = true; - - delete QxObjectDataBase[this._hashCode]; -}; - -/*! - Returns true if the object is disposed. -*/ -proto.getDisposed = function() { - return this._disposed; -}; - -/*! - Returns true if the object is disposed. +/* +--------------------------------------------------------------------------- + COMMON SETTER/GETTER SUPPORT +--------------------------------------------------------------------------- */ -proto.isDisposed = function() { - return this._disposed; -}; /*! Sets multiple properties at once by using a property list @@ -258,6 +210,18 @@ }; + + + + + + +/* +--------------------------------------------------------------------------- + DYNAMIC DATA STORAGE SUPPORT +--------------------------------------------------------------------------- +*/ + /*! */ @@ -378,4 +342,57 @@ delete this[QxConst.INTERNAL_RETRIEVEDEFAULT + methodKey]; delete this[QxConst.INTERNAL_STOREDEFAULT + methodKey]; delete this[QxConst.INTERNAL_RESTORE + methodKey]; -}; \ No newline at end of file +}; + + + + + + + +/* +--------------------------------------------------------------------------- + DISPOSER +--------------------------------------------------------------------------- +*/ + +proto._disposed = false; + +/*! + Dispose this object +*/ +proto.dispose = function() +{ + if (this.getDisposed()) { + return; + }; + + // Dispose data + if (this._data) + { + for(var p in this._data) { + this._data[p] = null; + }; + + this._data = null; + }; + + this._disposed = true; + + // Delete Entry from Object DB + QxObjectDataBase[this._hashCode] = null; +}; + +/*! + Returns true if the object is disposed. +*/ +proto.getDisposed = function() { + return this._disposed; +}; + +/*! + Returns true if the object is disposed. +*/ +proto.isDisposed = function() { + return this._disposed; +}; Index: QxTimer.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxTimer.js,v retrieving revision 1.5.2.20 retrieving revision 1.5.2.21 diff -u -d -r1.5.2.20 -r1.5.2.21 --- QxTimer.js 16 Jan 2006 16:11:55 -0000 1.5.2.20 +++ QxTimer.js 23 Jan 2006 12:43:46 -0000 1.5.2.21 @@ -73,7 +73,7 @@ this._intervalHandle = window.setInterval(this.__oninterval, this.getInterval()); }; - return QxTarget.prototype._modifyEnabled.call(this, propValue, propOldValue, propData); + return true; }; |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 12:43:54
|
Update of /cvsroot/qooxdoo/qooxdoo/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13188/tools Modified Files: Tag: renderer config.sh Log Message: Improved code and structure of QxObject, some cleanups Index: config.sh =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/tools/config.sh,v retrieving revision 1.16.2.97 retrieving revision 1.16.2.98 diff -u -d -r1.16.2.97 -r1.16.2.98 --- config.sh 19 Jan 2006 12:06:36 -0000 1.16.2.97 +++ config.sh 23 Jan 2006 12:43:47 -0000 1.16.2.98 @@ -11,6 +11,7 @@ # Core Qooxdoo Objects L="$L core/QxObject" +L="$L core/QxObjectCore" L="$L core/QxDom" L="$L core/QxDebug" L="$L core/QxTarget" |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 12:29:01
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8510/source/script/core Modified Files: Tag: renderer QxTarget.js QxUtil.js Log Message: Some code, comment and block improvements Index: QxUtil.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxUtil.js,v retrieving revision 1.1.2.15 retrieving revision 1.1.2.16 diff -u -d -r1.1.2.15 -r1.1.2.16 --- QxUtil.js 23 Jan 2006 11:14:09 -0000 1.1.2.15 +++ QxUtil.js 23 Jan 2006 12:28:53 -0000 1.1.2.16 @@ -34,9 +34,12 @@ -/* ******************************************************************** - Simple return methods -******************************************************************** */ + +/* +--------------------------------------------------------------------------- + SIMPLE RETURN METHODS +--------------------------------------------------------------------------- +*/ QxUtil.returnTrue = function() { return true; @@ -67,9 +70,12 @@ -/* ******************************************************************** - Utility Methods -******************************************************************** */ + +/* +--------------------------------------------------------------------------- + OBJECT UTILITIES +--------------------------------------------------------------------------- +*/ /* Function to check if a hash has any keys @@ -215,9 +221,12 @@ -/* ******************************************************************** - Value validation methods -******************************************************************** */ + +/* +--------------------------------------------------------------------------- + VALUE VALIDATION +--------------------------------------------------------------------------- +*/ /* All methods use the strict comparison operators as all modern @@ -355,9 +364,12 @@ -/* ******************************************************************** - Umlauts handling -******************************************************************** */ + +/* +--------------------------------------------------------------------------- + HANDLING OF UMLAUTS +--------------------------------------------------------------------------- +*/ QxUtil._normalizeUmlautsRegExp = /[\xE4\xF6\xFC\xDF\xC4\xD6\xDC]/g; Index: QxTarget.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxTarget.js,v retrieving revision 1.2.2.33 retrieving revision 1.2.2.34 diff -u -d -r1.2.2.33 -r1.2.2.34 --- QxTarget.js 20 Jan 2006 11:12:08 -0000 1.2.2.33 +++ QxTarget.js 23 Jan 2006 12:28:53 -0000 1.2.2.34 @@ -45,6 +45,17 @@ QxTarget.extend(QxObject, "QxTarget"); + + + + + +/* +--------------------------------------------------------------------------- + EVENT CONNECTION +--------------------------------------------------------------------------- +*/ + /*! Add event listener to object */ @@ -81,13 +92,6 @@ }; /*! - Check if there are one or more listeners for an event type -*/ -proto.hasEventListeners = function(vType) { - return this._listeners && typeof this._listeners[vType] != QxConst.TYPEOF_UNDEFINED; -}; - -/*! Remove event listener from object */ proto.removeEventListener = function(vType, vFunction, eObject) @@ -112,6 +116,29 @@ delete this._listeners[vType][vKey]; }; + + + + + + + +/* +--------------------------------------------------------------------------- + EVENT CONNECTION UTILITIES +--------------------------------------------------------------------------- +*/ + +/*! + Check if there are one or more listeners for an event type +*/ +proto.hasEventListeners = function(vType) { + return this._listeners && typeof this._listeners[vType] != QxConst.TYPEOF_UNDEFINED; +}; + +/*! + Checks if the event is registered. If so it creates a event object and dispatch it. +*/ proto.createDispatchEvent = function(n) { if (this.hasEventListeners(n)) { @@ -119,6 +146,9 @@ }; }; +/*! + Checks if the event is registered. If so it creates a data event object and dispatch it. +*/ proto.createDispatchDataEvent = function(n, newValue, oldValue) { if (this.hasEventListeners(n)) { @@ -126,7 +156,23 @@ }; }; -proto.dispatchEvent = function(e, dispose) + + + + + + + +/* +--------------------------------------------------------------------------- + EVENT DISPATCH +--------------------------------------------------------------------------- +*/ + +/*! + Public dispatch implementation +*/ +proto.dispatchEvent = function(vEvent, vEnableDispose) { // Ignore event if eventTarget is disposed if(this.getDisposed()) { @@ -134,13 +180,15 @@ }; // Dispatch Event - this._dispatchEvent(e, dispose); + this._dispatchEvent(vEvent, vEnableDispose); - return !e._defaultPrevented; + return !vEvent._defaultPrevented; }; -// Internal dispatch implementation -proto._dispatchEvent = function(e, dispose) +/*! + Internal dispatch implementation +*/ +proto._dispatchEvent = function(vEvent, vEnableDispose) { if(this.getDisposed()) { return; @@ -150,10 +198,10 @@ if (vListeners) { // Setup current target - e.setCurrentTarget(this); + vEvent.setCurrentTarget(this); // Shortcut for listener data - var vTypeListeners = vListeners[e.getType()]; + var vTypeListeners = vListeners[vEvent.getType()]; if(vTypeListeners) { @@ -170,12 +218,12 @@ try { if(typeof vFunction == QxConst.TYPEOF_FUNCTION) { - vFunction.call(QxUtil.isValid(vObject) ? vObject : this, e); + vFunction.call(QxUtil.isValid(vObject) ? vObject : this, vEvent); }; } catch(ex) { - this.error("Could not dispatch event of type \"" + e.getType() + "\": " + ex, "_dispatchEvent"); + this.error("Could not dispatch event of type \"" + vEvent.getType() + "\": " + ex, "_dispatchEvent"); }; }; }; @@ -183,21 +231,35 @@ // Bubble event to parents var vParent = this.getParent(); - if(e.getBubbles() && !e.getPropagationStopped() && vParent && !vParent.getDisposed() && vParent.getEnabled()) { - vParent._dispatchEvent(e, false); + if(vEvent.getBubbles() && !vEvent.getPropagationStopped() && vParent && !vParent.getDisposed() && vParent.getEnabled()) { + vParent._dispatchEvent(vEvent, false); }; - // Dispose event? - dispose && e.dispose(); + // vEnableDispose event? + vEnableDispose && vEvent.dispose(); }; +/*! + Internal placeholder for bubbling phase of an event. +*/ proto.getParent = function() { - return null; + return null; }; + + + + + +/* +--------------------------------------------------------------------------- + DISPOSER +--------------------------------------------------------------------------- +*/ + proto.dispose = function() { - if(this._disposed) { + if(this.getDisposed()) { return; }; @@ -205,8 +267,7 @@ { for (var vType in this._listeners) { - for (var vKey in this._listeners[vType]) - { + for (var vKey in this._listeners[vType]) { delete this._listeners[vType][vKey]; }; |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 12:29:01
|
Update of /cvsroot/qooxdoo/qooxdoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8510 Modified Files: Tag: renderer TODO Log Message: Some code, comment and block improvements Index: TODO =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/TODO,v retrieving revision 1.1.2.45 retrieving revision 1.1.2.46 diff -u -d -r1.1.2.45 -r1.1.2.46 --- TODO 23 Jan 2006 12:04:34 -0000 1.1.2.45 +++ TODO 23 Jan 2006 12:28:53 -0000 1.1.2.46 @@ -8,8 +8,6 @@ * Optimize unit detection and unit handling and storage for dimension and location properties. Try to remove all these boolean flags. * Rework and cleanup disposer code - do we really need to dispose all this stuff? -* Cleanup QxTarget stuff - * Splitting QxNativeWindow (Move virtual mode to new class which itself inherits from the cleaned up QxNativeWindow) h4. Layouter Rework |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 12:04:49
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/managers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31891/source/script/managers Modified Files: Tag: renderer QxImageManager.js Log Message: Reduced buildURI calls for image handling Index: QxImageManager.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/managers/QxImageManager.js,v retrieving revision 1.3.2.24 retrieving revision 1.3.2.25 diff -u -d -r1.3.2.24 -r1.3.2.25 --- QxImageManager.js 16 Jan 2006 16:11:56 -0000 1.3.2.24 +++ QxImageManager.js 23 Jan 2006 12:04:34 -0000 1.3.2.25 @@ -56,6 +56,11 @@ Preload images */ this._preloadList = {}; + + /*! + Image URIs + */ + this._uris = {}; // Add default icon themes this.addIconTheme("Crystal Clear", "crystalclear"); @@ -108,6 +113,17 @@ proto.buildURI = function(vPath) { + var vUri = this._uris[vPath]; + + if (typeof vUri == QxConst.TYPEOF_UNDEFINED) { + vUri = this._uris[vPath] = this._buildURI(vPath); + }; + + return vUri; +}; + +proto._buildURI = function(vPath, vForce) +{ switch(vPath.charAt(0)) { case QxConst.CORE_SLASH: @@ -120,6 +136,7 @@ case QxConst.PROTOCOL_HTTP: case QxConst.PROTOCOL_HTTPS: case QxConst.PROTOCOL_FTP: + case QxConst.PROTOCOL_FILE: return vPath; }; @@ -141,10 +158,13 @@ { var o; + // reset cache + this._uris = {}; + for (var i in this._objects) { o = this._objects[i]; - o.setPreloader(new QxImagePreloader(this.buildURI(o.getSource()))); + o.setPreloader(new QxImagePreloader(this.buildURI(o.getSource(), true))); }; return true; |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 12:04:49
|
Update of /cvsroot/qooxdoo/qooxdoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31891 Modified Files: Tag: renderer TODO Log Message: Reduced buildURI calls for image handling Index: TODO =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/TODO,v retrieving revision 1.1.2.44 retrieving revision 1.1.2.45 diff -u -d -r1.1.2.44 -r1.1.2.45 --- TODO 23 Jan 2006 11:14:09 -0000 1.1.2.44 +++ TODO 23 Jan 2006 12:04:34 -0000 1.1.2.45 @@ -4,7 +4,6 @@ * Discuss property names: "html", "text" and "content" for QxText, QxHtml and QxLabel. * isDisplayed vs. isDisplayable (cleanups naming) -* Reduce buildURI calls from Image handling stuff. * Optimize addProperty, use multiple functions for setters which themselves only call submethods and send the "p" variable to the handlers. Build setters which only do the stuff, which is needed for this property. Try to remove these "hasXXX" stuff. * Optimize unit detection and unit handling and storage for dimension and location properties. Try to remove all these boolean flags. * Rework and cleanup disposer code - do we really need to dispose all this stuff? @@ -22,6 +21,8 @@ h4. Later +* Support for images from custom path (resource like: application/...) + * Add generated debug console (which does not need a "div" inside the document) * Add behaviour support |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 11:24:24
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/developer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18782/source/test/developer Modified Files: Tag: renderer Umlauts_1.html Log Message: Changed description Index: Umlauts_1.html =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/test/developer/Attic/Umlauts_1.html,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- Umlauts_1.html 23 Jan 2006 11:14:09 -0000 1.1.2.1 +++ Umlauts_1.html 23 Jan 2006 11:24:14 -0000 1.1.2.2 @@ -19,7 +19,7 @@ <script type="text/javascript" src="../../../tools/script/demolayout.js"></script> <div id="testDescription"> - <p>Please choose an example from the select area below. Enjoy! ;-)</p> + <p>Test some Umlauts methods from the String.prototype.</p> </div> <script type="text/javascript"> |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 11:14:17
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/developer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15722/source/test/developer Added Files: Tag: renderer Umlauts_1.html Log Message: Improved Umlauts handling, removed hardcoded ISO characters --- NEW FILE: Umlauts_1.html --- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <script type="text/javascript">window._htmlstart=(new Date).valueOf()</script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> <meta http-equiv="MsThemeCompatible" content="yes" /> <meta http-equiv="ImageToolBar" content="no" /> <meta name="MSSmartTagsPreventParsing" content="yes" /> <title>qooxdoo demo dev</title> <link type="text/css" rel="stylesheet" href="../../style/qooxdoo.css"/> <link type="text/css" rel="stylesheet" href="../../style/demolayout.css"/> <script type="text/javascript" src="../../../tools/script/includer.js"></script> </head> <body> <script type="text/javascript" src="../../../tools/script/demolayout.js"></script> <div id="testDescription"> <p>Please choose an example from the select area below. Enjoy! ;-)</p> </div> <script type="text/javascript"> window.application.main = function() { this.debug("Umlauts Short: " + "äöüßÄÖÜ".normalizeUmlautsShort()) this.debug("Umlauts Long: " + "äöüßÄÖÜ".normalizeUmlautsLong()) }; </script> </body> </html> |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 11:14:17
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15722/source/script/core Modified Files: Tag: renderer QxCompare.js QxNative.js QxUtil.js Log Message: Improved Umlauts handling, removed hardcoded ISO characters Index: QxUtil.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxUtil.js,v retrieving revision 1.1.2.14 retrieving revision 1.1.2.15 diff -u -d -r1.1.2.14 -r1.1.2.15 --- QxUtil.js 18 Jan 2006 09:43:56 -0000 1.1.2.14 +++ QxUtil.js 23 Jan 2006 11:14:09 -0000 1.1.2.15 @@ -349,3 +349,34 @@ return false; }; + + + + + + +/* ******************************************************************** + Umlauts handling +******************************************************************** */ + +QxUtil._normalizeUmlautsRegExp = /[\xE4\xF6\xFC\xDF\xC4\xD6\xDC]/g; + +QxUtil._normalizeUmlautsShortData = { "\xC4": "A", "\xD6": "O", "\xDC": "U", "\xE4": "a", "\xF6": "o", "\xFC": "u", "\xDF": "s" }; + +QxUtil._normalizeUmlautsShort = function(vChar) { + return QxUtil._normalizeUmlautsShortData[vChar]; +}; + +QxUtil.normalizeUmlautsShort = function(vString) { + return vString.replace(QxUtil._normalizeUmlautsRegExp, QxUtil._normalizeUmlautsShort); +}; + +QxUtil._normalizeUmlautsLongData = { "\xC4": "Ae", "\xD6": "Oe", "\xDC": "Ue", "\xE4": "ae", "\xF6": "oe", "\xFC": "ue", "\xDF": "ss" }; + +QxUtil._normalizeUmlautsLong = function(vChar) { + return QxUtil._normalizeUmlautsLongData[vChar]; +}; + +QxUtil.normalizeUmlautsLong = function(vString) { + return vString.replace(QxUtil._normalizeUmlautsRegExp, QxUtil._normalizeUmlautsLong); +}; Index: QxNative.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxNative.js,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -d -r1.1.2.8 -r1.1.2.9 --- QxNative.js 19 Jan 2006 16:32:48 -0000 1.1.2.8 +++ QxNative.js 23 Jan 2006 11:14:09 -0000 1.1.2.9 @@ -27,6 +27,8 @@ #package(core) #require(QxClient) +#require(QxUtil) +#require(QxConst) ************************************************************************ */ @@ -318,15 +320,15 @@ }; String.prototype.trimLeft = function() { - return this.replace(/^\\s+/, ""); + return this.replace(/^\\s+/, QxConst.CORE_EMPTY); }; String.prototype.trimRight = function() { - return this.replace(/\\s+$/, ""); + return this.replace(/\\s+$/, QxConst.CORE_EMPTY); }; String.prototype.trim = function() { - return this.replace(/^\\s+|\\s+$/g, ""); + return this.replace(/^\\s+|\\s+$/g, QxConst.CORE_EMPTY); }; String.prototype.add = function(v, sep) @@ -389,23 +391,12 @@ return this.replace(/<\/?[^>]+>/gi, QxConst.CORE_EMPTY); }; -// TODO: move to QxUtil ?? -/* -_rxUmlauts = new RegExp("[???????]", "g"); -_normalizedUmlauts = { "Ä": "A", "Ö": "O", "Ü": "U", "ä": "a", "ö": "o", "ü": "u", "ß": "s" }; -_normalizedUmlautsLong = { "Ä": "Ae", "Ö": "Oe", "Ü": "Ue", "ä": "ae", "ö": "oe", "ü": "ue", "ß": "ss" }; -*/ - -String.prototype.normalizeUmlauts = function() -{ - // TODO: see above - // return this.replace( _rxUmlauts, function(s) { return _normalizedUmlauts[s] } ); - - return this.replace(/Ä/g, "A").replace(/Ö/g, "O").replace(/Ü/g, "U").replace(/ä/g, "a").replace(/ö/g, "o").replace(/ü/g, "u").replace(/ß/g, "s"); +String.prototype.normalizeUmlautsLong = function() { + return QxUtil.normalizeUmlautsLong(this); }; -String.prototype.normalizeUmlautsLong = function() { - return this.replace(/Ä/g, "Ae").replace(/Ö/g, "Oe").replace(/Ü/g, "Ue").replace(/ä/g, "ae").replace(/ö/g, "oe").replace(/ü/g, "ue").replace(/ß/g, "ss"); +String.prototype.normalizeUmlautsShort = function() { + return QxUtil.normalizeUmlautsShort(this); }; Index: QxCompare.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxCompare.js,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -d -r1.1.2.5 -r1.1.2.6 --- QxCompare.js 17 Jan 2006 13:47:11 -0000 1.1.2.5 +++ QxCompare.js 23 Jan 2006 11:14:09 -0000 1.1.2.6 @@ -39,12 +39,12 @@ return QxCompare.byString(a.toLowerCase(), b.toLowerCase()); }; -QxCompare.byStringUmlauts = function(a, b) { - return QxCompare.byString(a.normalizeUmlauts(), b.normalizeUmlauts()); +QxCompare.byStringUmlautsShort = function(a, b) { + return QxCompare.byString(a.normalizeUmlauts(), b.normalizeUmlautsShort()); }; -QxCompare.byStringUmlautsCaseInsensitive = function(a, b) { - return QxCompare.byString(a.normalizeUmlauts().toLowerCase(), b.normalizeUmlauts().toLowerCase()); +QxCompare.byStringUmlautsShortCaseInsensitive = function(a, b) { + return QxCompare.byString(a.normalizeUmlauts().toLowerCase(), b.normalizeUmlautsShort().toLowerCase()); }; QxCompare.byStringUmlautsLong = function(a, b) { |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 11:14:16
|
Update of /cvsroot/qooxdoo/qooxdoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15722 Modified Files: Tag: renderer TODO Log Message: Improved Umlauts handling, removed hardcoded ISO characters Index: TODO =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/TODO,v retrieving revision 1.1.2.43 retrieving revision 1.1.2.44 diff -u -d -r1.1.2.43 -r1.1.2.44 --- TODO 20 Jan 2006 11:12:08 -0000 1.1.2.43 +++ TODO 23 Jan 2006 11:14:09 -0000 1.1.2.44 @@ -1,8 +1,5 @@ h4. For next release -* UTF-8 coding for files to fix "umlauts" in parts of the current code. - Or change the examples to include the qooxdoo.js with the charset="iso-8859-15" attribute? - * Make API nice, clean and consistent: * Discuss property names: "html", "text" and "content" for QxText, QxHtml and QxLabel. * isDisplayed vs. isDisplayable (cleanups naming) |
|
From: Sebastian W. <wp...@us...> - 2006-01-22 20:21:38
|
Update of /cvsroot/qooxdoo/qooxdoo/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10841/tools Modified Files: Tag: renderer compileng.py compileng_compress.xsl Log Message: Added new (forced) space handling for some protected names Index: compileng_compress.xsl =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/tools/Attic/compileng_compress.xsl,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -d -r1.1.2.8 -r1.1.2.9 --- compileng_compress.xsl 22 Jan 2006 18:32:52 -0000 1.1.2.8 +++ compileng_compress.xsl 22 Jan 2006 20:21:28 -0000 1.1.2.9 @@ -67,6 +67,10 @@ <xsl:apply-templates/> </xsl:template> +<xsl:template match="space"> + <xsl:text> </xsl:text> +</xsl:template> + Index: compileng.py =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/tools/Attic/compileng.py,v retrieving revision 1.1.2.70 retrieving revision 1.1.2.71 diff -u -d -r1.1.2.70 -r1.1.2.71 --- compileng.py 22 Jan 2006 18:05:55 -0000 1.1.2.70 +++ compileng.py 22 Jan 2006 20:21:28 -0000 1.1.2.71 @@ -119,7 +119,10 @@ SEPARATORS = [ ",", ";", ":", "(", ")", "{", "}", "[", "]", ".", "?" ] BLOCKSEPARATORS = [ ",", ";", ":", "(", ")", "{", "}", "[", "]", "?" ] -COMMANDS = [ "instanceof", "in", "delete", "var", "new", "typeof", "return", "throw", "function", "void" ] + +SPACEAROUND = [ "in", "instanceof" ] +SPACEAFTER = [ "throw", "new", "delete", "var", "typeof", "return" ] + BUILTIN = [ "Object", "Array", "RegExp", "Math", "String", "Number", "Error" ] R_QXEXTEND = re.compile("([a-zA-Z]+)\.extend\(([a-zA-Z0-9_-]+).*\)") @@ -463,6 +466,21 @@ det = item["detail"] src = item["source"] + + if pos > 0: + lastitem = data[pos-1] + + if lastitem["type"] != "eol" and lastitem["type"] != "comment": + lastitem_typ = lastitem["type"] + lastitem_det = lastitem["detail"] + lastitem_src = lastitem["source"] + + else: + lastitem_typ = "" + lastitem_det = "" + lastitem_src = "" + + # store in global variable sourceline = lin @@ -570,8 +588,14 @@ tagstart("else") else: + if src in SPACEAROUND: + tagspace() + tagsource(typ, det, src) + if src in SPACEAFTER or src in SPACEAROUND: + tagspace() + elif typ == "number" or typ == "string" or typ == "regexp": @@ -596,6 +620,13 @@ xmloutput += "%s<%s>%s</%s>\n" % ((" " * xmlindent), tag, content, tag) +def tagspace(): + global xmlindent + global xmloutput + global sourceline + + xmloutput += "%s<space line=\"%s\"/>\n" % ((" " * xmlindent), sourceline) + def tagsource(tag, detail, source): global xmlindent global xmloutput |
|
From: Sebastian W. <wp...@us...> - 2006-01-22 18:33:01
|
Update of /cvsroot/qooxdoo/qooxdoo/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4278/tools Modified Files: Tag: renderer compileng_compress.xsl Log Message: Improved blocks Index: compileng_compress.xsl =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/tools/Attic/compileng_compress.xsl,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -d -r1.1.2.7 -r1.1.2.8 --- compileng_compress.xsl 22 Jan 2006 18:05:55 -0000 1.1.2.7 +++ compileng_compress.xsl 22 Jan 2006 18:32:52 -0000 1.1.2.8 @@ -3,8 +3,10 @@ <xsl:output method="text" version="1.0" encoding="iso-8859-1"/> -<xsl:param name="blockdivider">; -</xsl:param> + + + +<!-- ******** CORE ******** --> <xsl:template match="/"> <result> @@ -14,6 +16,15 @@ <xsl:template match="text()"/> +<xsl:param name="blockdivider">; +</xsl:param> + + + + + +<!-- ******** STRUCTURE ******** --> + <xsl:template match="block"> <xsl:apply-templates/> @@ -22,6 +33,14 @@ </xsl:if> </xsl:template> + + + + + + +<!-- ******** GROUPS ******** --> + <xsl:template match="function"> <xsl:text>function</xsl:text> @@ -48,6 +67,13 @@ <xsl:apply-templates/> </xsl:template> + + + + + +<!-- ******** BLOCKS ******** --> + <xsl:template match="commandgroup"> <xsl:text>{</xsl:text> <xsl:apply-templates/> @@ -90,6 +116,14 @@ </xsl:if> </xsl:template> + + + + + + +<!-- ******** CONTENT ******** --> + <xsl:template match="namegroup"> <xsl:for-each select="*"> <xsl:value-of select="text()"/> @@ -150,6 +184,14 @@ </xsl:choose> </xsl:template> + + + + + + +<!-- ******** TYPES ******** --> + <xsl:template match="number|regexp|boolean|name|builtin"> <xsl:value-of select="text()"/> |
|
From: Sebastian W. <wp...@us...> - 2006-01-22 18:26:46
|
Update of /cvsroot/qooxdoo/qooxdoo/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1732/tools Modified Files: Tag: renderer compileng_structure.xsl Log Message: Enhanced namegroup handling for properties Index: compileng_structure.xsl =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/tools/Attic/compileng_structure.xsl,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- compileng_structure.xsl 16 Jan 2006 17:04:18 -0000 1.1.2.2 +++ compileng_structure.xsl 22 Jan 2006 18:26:38 -0000 1.1.2.3 @@ -3,6 +3,12 @@ <xsl:output method="xml" indent="yes" version="1.0" encoding="iso-8859-1"/> + + + + +<!-- ******** CORE ******** --> + <xsl:template match="/"> <result> <properties> @@ -16,6 +22,13 @@ <xsl:template match="text()"/> + + + + + +<!-- ******** UTILITIES ******** --> + <xsl:template name="tolower"> <xsl:param name="in"/> @@ -34,16 +47,42 @@ <xsl:value-of select="substring($in, 2)"/> </xsl:template> + + + + + + +<!-- ******** PROPERTIES ******** --> + <xsl:template match="name[text()='addProperty']"> <property> <xsl:for-each select="../following-sibling::argumentgroup/commandgroup/block/namegroup[following-sibling::token[position()=1 and @detail='COLON']]"> <xsl:attribute name="{name/text()}"> - <xsl:value-of select="following-sibling::*[position()=2]/text()"/> + <xsl:choose> + <xsl:when test="following-sibling::*[position()=2 and name()='namegroup']"> + <xsl:for-each select="following-sibling::*[position()=2 and name()='namegroup']/*"> + <xsl:value-of select="."/> + <xsl:if test="position()!=last()">.</xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="following-sibling::*[position()=2]/text()"/> + </xsl:otherwise> + </xsl:choose> </xsl:attribute> </xsl:for-each> </property> </xsl:template> + + + + + + +<!-- ******** FUNCTIONS ******** --> + <xsl:template match="function"> <function> <xsl:attribute name="modifier">false</xsl:attribute> @@ -53,17 +92,17 @@ <xsl:choose> <xsl:when test="namegroup"> <xsl:attribute name="anonymous">false</xsl:attribute> - + <xsl:for-each select="namegroup/*[position()=last()]"> <xsl:value-of select="text()"/> - </xsl:for-each> + </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:attribute name="anonymous">true</xsl:attribute> - + <xsl:for-each select="preceding-sibling::namegroup/*[position()=last()]"> <xsl:value-of select="text()"/> - </xsl:for-each> + </xsl:for-each> </xsl:otherwise> </xsl:choose> </xsl:variable> @@ -71,7 +110,7 @@ <xsl:attribute name="name"> <xsl:value-of select="$name"/> </xsl:attribute> - + <xsl:if test="starts-with($name, '_')"> <xsl:attribute name="private">true</xsl:attribute> |
|
From: Sebastian W. <wp...@us...> - 2006-01-22 18:06:24
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/managers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24916/source/script/managers Modified Files: Tag: renderer QxManager.js Log Message: Minor enhancements Index: QxManager.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/managers/QxManager.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 --- QxManager.js 16 Jan 2006 16:11:56 -0000 1.1.2.12 +++ QxManager.js 22 Jan 2006 18:06:15 -0000 1.1.2.13 @@ -87,8 +87,9 @@ { for (var i in this._objects) { - if (typeof this._objects[i] == QxConst.TYPEOF_OBJECT) + if (typeof this._objects[i] == QxConst.TYPEOF_OBJECT) { this._objects[i].dispose(); + }; delete this._objects[i]; }; |
|
From: Sebastian W. <wp...@us...> - 2006-01-22 18:06:05
|
Update of /cvsroot/qooxdoo/qooxdoo/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24641/tools Modified Files: Tag: renderer compileng.py compileng_compress.xsl Log Message: Added else block support Index: compileng_compress.xsl =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/tools/Attic/compileng_compress.xsl,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -d -r1.1.2.6 -r1.1.2.7 --- compileng_compress.xsl 16 Jan 2006 21:16:45 -0000 1.1.2.6 +++ compileng_compress.xsl 22 Jan 2006 18:05:55 -0000 1.1.2.7 @@ -3,7 +3,8 @@ <xsl:output method="text" version="1.0" encoding="iso-8859-1"/> -<xsl:param name="blockdivider">;</xsl:param> +<xsl:param name="blockdivider">; +</xsl:param> <xsl:template match="/"> <result> @@ -37,6 +38,16 @@ <xsl:apply-templates/> </xsl:template> +<xsl:template match="else"> + <xsl:text>else</xsl:text> + + <xsl:if test="child::*[position()=1 and name() != 'commandgroup']"> + <xsl:text> </xsl:text> + </xsl:if> + + <xsl:apply-templates/> +</xsl:template> + <xsl:template match="commandgroup"> <xsl:text>{</xsl:text> <xsl:apply-templates/> @@ -46,7 +57,7 @@ <xsl:when test="preceding-sibling::*[position()=1 and name() = 'protected' and @detail = 'DO'] and following-sibling::*[position()=1 and name() = 'protected' and @detail = 'WHILE']"> <!-- PASS: Do-While --> </xsl:when> - <xsl:when test="following-sibling::*[position()=1 and name() != 'token' and not(@detail = 'ELSE' or @detail = 'CATCH' or @detail = 'FINALLY')]"> + <xsl:when test="following-sibling::*[position()=1 and name() != 'token' and not(name() = 'else' or @detail = 'CATCH' or @detail = 'FINALLY')]"> <xsl:value-of select="$blockdivider"/> </xsl:when> </xsl:choose> @@ -90,7 +101,7 @@ <xsl:when test="following-sibling::*[position()=1 and name() = 'protected' and (@detail = 'IN' or @detail = 'INSTANCEOF')]"> <xsl:text> </xsl:text> </xsl:when> - <xsl:when test="following-sibling::*[position()=1 and ((name() = 'protected' and not(@detail = 'ELSE')) or name() = 'namegroup' or name() = 'builtin')]"> + <xsl:when test="following-sibling::*[position()=1 and (name() = 'protected' or name() = 'namegroup' or name() = 'builtin')]"> <xsl:value-of select="$blockdivider"/> </xsl:when> </xsl:choose> @@ -105,10 +116,7 @@ <xsl:value-of select="text()"/> <xsl:choose> - <xsl:when test="@detail = 'ELSE' and following-sibling::*[position()=1 and name() = 'if']"> - <xsl:text> </xsl:text> - </xsl:when> - <xsl:when test="@detail != 'ELSE' and following-sibling::*[position()=1 and (name() = 'if' or (name() = 'protected' and @detail = 'RETURN'))]"> + <xsl:when test="following-sibling::*[position()=1 and (name() = 'if' or (name() = 'protected' and @detail = 'RETURN'))]"> <xsl:value-of select="$blockdivider"/> </xsl:when> <xsl:when test="following-sibling::*[position()=1 and name() = 'protected' and (@detail = 'CASE' or @detail = 'DEFAULT')]"> @@ -145,7 +153,7 @@ <xsl:template match="number|regexp|boolean|name|builtin"> <xsl:value-of select="text()"/> - <xsl:if test="count(following-sibling::*) > 0 and following-sibling::*[position()=1 and ((name() = 'protected' and not(@detail = 'ELSE')) or name() = 'namegroup' or name() = 'builtin')]"> + <xsl:if test="count(following-sibling::*) > 0 and following-sibling::*[position()=1 and (name() = 'protected' or name() = 'namegroup' or name() = 'builtin')]"> <xsl:value-of select="$blockdivider"/> </xsl:if> </xsl:template> @@ -160,7 +168,7 @@ <xsl:value-of select="concat($quote, text(), $quote)"/> - <xsl:if test="count(following-sibling::*) > 0 and following-sibling::*[position()=1 and ((name() = 'protected' and not(@detail = 'ELSE')) or name() = 'namegroup' or name() = 'builtin')]"> + <xsl:if test="count(following-sibling::*) > 0 and following-sibling::*[position()=1 and (name() = 'protected' or name() = 'namegroup' or name() = 'builtin')]"> <xsl:value-of select="$blockdivider"/> </xsl:if> </xsl:template> Index: compileng.py =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/tools/Attic/compileng.py,v retrieving revision 1.1.2.69 retrieving revision 1.1.2.70 diff -u -d -r1.1.2.69 -r1.1.2.70 --- compileng.py 16 Jan 2006 21:06:05 -0000 1.1.2.69 +++ compileng.py 22 Jan 2006 18:05:55 -0000 1.1.2.70 @@ -175,7 +175,7 @@ -def analyse(part, data): +def storepart(part, data): global tokenizerFile global tokenizerLine global operatorMode @@ -235,14 +235,6 @@ -def comment(part): - global tokenizerFile - global tokenizerLine - - return { "type" : "comment", "source" : part, "detail" : "", "line" : tokenizerLine, "file" : tokenizerFile } - - - def recoverEscape(s): @@ -322,7 +314,7 @@ if R_WHITESPACE.match(char): if R_NONWHITESPACE.match(tempStr): # print "ANALYSE[1a]: %s" % tempStr - analyse(tempStr, data) + storepart(tempStr, data) tempStr = "" operatorMode = False @@ -331,9 +323,9 @@ elif char in SEPARATORS: if R_NONWHITESPACE.match(tempStr): # print "ANALYSE[1b]: %s" % tempStr - analyse(tempStr, data) + storepart(tempStr, data) - analyse(char, data) + storepart(char, data) tempStr = "" continue @@ -342,13 +334,13 @@ # for example: e<f or !this if TOKENS.has_key(char): if ((not operatorMode) and tempStr != "") or (len(tempStr) > 0 and tempStr[-1] == "=" and char != "="): - analyse(tempStr, data) + storepart(tempStr, data) tempStr = "" operatorMode = True elif operatorMode: - analyse(tempStr, data) + storepart(tempStr, data) tempStr = "" operatorMode = False @@ -356,13 +348,13 @@ if tempStr == "__$MULTICOMMENT$__" or tempStr == "__$SINGLECOMMENT$__" or tempStr == "__$STRINGA$__" or tempStr == "__$STRINGB$__" or tempStr == "__$REGEXP$__": #print "upps: " + tempStr - analyse(tempStr, data) + storepart(tempStr, data) tempStr = "" if tempStr != "": - analyse(tempStr, data) + storepart(tempStr, data) tempStr = "" # print "EOL" @@ -421,7 +413,14 @@ tagstop("block") elif need: - print " Warning: Used semicolon outside a block! (line: %s)" % sourceline + print " Warning: Used semicolon outside a block! (Line: %s)" % sourceline + + + while treecontext[-1] == "else": + tagstop("else") + + if treecontext[-1] == "block": + tagstop("block") if treecontext[-1] == "if": @@ -430,13 +429,18 @@ -def treeblockstart(): + +def treeblockstart(typ, det, src): global xmlindent global treecontext global sourceline if treecontext[-1] == "if": - print " Warning: Missing brackets for if command! (line: %s)" % sourceline + print " Info: No brackets for if command! (Line: %s)" % sourceline + + if treecontext[-1] == "else" and not(typ == "protected" and det == "IF"): + print " Info: No brackets for else command! (Line: %s)" % sourceline + tagstart("block") @@ -455,8 +459,8 @@ pos += 1 lin = item["line"] - det = item["detail"] typ = item["type"] + det = item["detail"] src = item["source"] # store in global variable @@ -488,6 +492,9 @@ tagstart("commandgroup") elif det == "RC": + if treecontext[-1] == "else": + tagstop("else") + if treecontext[-1] == "block": tagstop("block") @@ -496,6 +503,9 @@ if treecontext[-1] == "if": tagstop("if") + elif treecontext[-1] == "else": + tagstop("else") + elif treecontext[-1] == "function": tagstop("function") @@ -525,7 +535,7 @@ else: if treecontext[-1] != "namegroup" and treecontext[-1] != "block": - treeblockstart() + treeblockstart(typ, det, src) tagsource(typ, det, src) # print "Other token: %s" % src @@ -534,7 +544,7 @@ else: if treecontext[-1] != "namegroup" and treecontext[-1] != "block" and treecontext[-1] != "function": - treeblockstart() + treeblockstart(typ, det, src) @@ -548,12 +558,17 @@ if treecontext[-1] == "namegroup": tagstop("namegroup") + + if det == "FUNCTION": tagstart("function") elif det == "IF": tagstart("if") + elif det == "ELSE": + tagstart("else") + else: tagsource(typ, det, src) @@ -619,7 +634,7 @@ while treecontext[-1] != tag: - print "Line %s: Want to close: %s, but in wrong tree context: %s" % (sourceline, tag, treecontext[-1]) + print " Warning: Want to close: %s, but in wrong tree context: %s (Line: %s)" % (tag, treecontext[-1], sourceline) xmlindent -= 1; xmloutput += "%s</%s>\n" % ((" " * xmlindent), treecontext.pop()) @@ -953,6 +968,7 @@ print " -gd, --generate-docs enabled the generation of a API documentation" print print " -a, --use-all include all known files" + print " -i, --ignore-deps ignore dependencies, use only given packages and files" print " -cf, --combined-file <FILE> create a combined file with the given filename" print " -oc, --only-combined do not create single compressed files (useful in" print " combination with the previous option)" |
|
From: Sebastian W. <wp...@us...> - 2006-01-22 17:59:05
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20711/source/script/gui Modified Files: Tag: renderer QxWidget.js Log Message: Minor improvements Index: QxWidget.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/gui/Attic/QxWidget.js,v retrieving revision 1.1.2.48 retrieving revision 1.1.2.49 diff -u -d -r1.1.2.48 -r1.1.2.49 --- QxWidget.js 17 Jan 2006 13:47:13 -0000 1.1.2.48 +++ QxWidget.js 22 Jan 2006 17:58:32 -0000 1.1.2.49 @@ -4018,7 +4018,9 @@ document.body.appendChild(t); var c = QxDom.getComputedScrollBarSizeRight(t); - if (c) QxWidget.SCROLLBAR_SIZE = c; + if (c) { + QxWidget.SCROLLBAR_SIZE = c; + }; document.body.removeChild(t); }; |
|
From: Sebastian W. <wp...@us...> - 2006-01-20 19:02:47
|
Update of /cvsroot/qooxdoo/qooxdoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30889 Modified Files: Tag: renderer CHANGELOG Log Message: Updated Index: CHANGELOG =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/Attic/CHANGELOG,v retrieving revision 1.1.2.33 retrieving revision 1.1.2.34 diff -u -d -r1.1.2.33 -r1.1.2.34 --- CHANGELOG 20 Jan 2006 15:11:24 -0000 1.1.2.33 +++ CHANGELOG 20 Jan 2006 19:02:37 -0000 1.1.2.34 @@ -1,3 +1,16 @@ +2006-01-20 19:25 wpbasti + + * source/test/user/Transport_1.html: Minor fix + +2006-01-20 18:46 ecker + + * source/script/transport/QxRequest.js: Used string constants; + fixed typo. + +2006-01-20 16:11 wpbasti + + * CHANGELOG: Updated + 2006-01-20 15:42 wpbasti * source/script/transport/: QxRequest.js, QxXmlHttpTransport.js: |
|
From: Sebastian W. <wp...@us...> - 2006-01-20 18:25:27
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18795/source/test/user Modified Files: Tag: renderer Transport_1.html Log Message: Minor fix Index: Transport_1.html =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/test/user/Attic/Transport_1.html,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -d -r1.1.2.9 -r1.1.2.10 --- Transport_1.html 19 Jan 2006 18:49:36 -0000 1.1.2.9 +++ Transport_1.html 20 Jan 2006 18:25:18 -0000 1.1.2.10 @@ -26,28 +26,28 @@ window.application.main = function() { var d = this.getClientWindow().getClientDocument(); - + var lay = new QxVerticalBoxLayout; lay.setLocation(20, 48); lay.setRight(335); lay.setBottom(48); this.add(lay); - - - + + + var fsq = new QxFieldSet("Request"); fsq.setHeight("auto"); lay.add(fsq); - - + + var hlay = new QxHorizontalBoxLayout; hlay.setVerticalChildrenAlign("middle"); hlay.setSpacing(4); hlay.auto(); fsq.add(hlay); - - - var cm1 = new QxComboBox(); + + + var cm1 = new QxComboBox(); cm1.add(new QxListItem("data/items/1.xml")); cm1.add(new QxListItem("data/items/2.xml")); cm1.add(new QxListItem("data/loadByName/Anita.xml")); @@ -58,24 +58,24 @@ cm1.setSelected(cm1.getList().getFirstChild()); cm1.setWidth(200); cm1.addEventListener("changeSelected", upd); - + hlay.add(cm1); - - - var btn = new QxButton("Send", "icons/16/apply.png"); + + + var btn = new QxButton("Send", "icons/16/apply.png"); btn.addEventListener("execute", upd); hlay.add(btn); - - + + var inf = new QxTextField("Status"); hlay.add(inf); - - - + + + var fsr = new QxFieldSet("Result"); fsr.setHeight("1*"); lay.add(fsr); - + var area = new QxTextArea; area.setDimension("100%", "100%"); fsr.add(area); @@ -92,27 +92,27 @@ function upd(e) { var val = cm1.getSelected(); - + if (!val) { return; }; - - var req = new QxRequest(val.getLabel()); - req.addEventListener("sending", function(e) { + var req = new QxGetRequest(val.getLabel()); + + req.addEventListener("sending", function(e) { inf.setValue("Sending"); }); - req.addEventListener("receiving", function(e) { + req.addEventListener("receiving", function(e) { inf.setValue("Receiving"); }); - - req.addEventListener("completed", function(e) - { + + req.addEventListener("completed", function(e) + { inf.setValue("Completed"); - area.setValue(e.getNewValue().getTextContent()); + area.setValue(e.getNewValue().getTextContent()); }); - + req.send(); }; }; |
|
From: Andreas E. <ec...@us...> - 2006-01-20 17:46:37
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1592/source/script/transport Modified Files: Tag: renderer QxRequest.js Log Message: Used string constants; fixed typo. Index: QxRequest.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/transport/Attic/QxRequest.js,v retrieving revision 1.1.2.14 retrieving revision 1.1.2.15 diff -u -d -r1.1.2.14 -r1.1.2.15 --- QxRequest.js 20 Jan 2006 14:42:18 -0000 1.1.2.14 +++ QxRequest.js 20 Jan 2006 17:46:26 -0000 1.1.2.15 @@ -50,7 +50,17 @@ */ QxRequest.addProperty({ name : "url", type : QxConst.TYPEOF_STRING }); -QxRequest.addProperty({ name : "method", type : QxConst.TYPEOF_STRING, possibleValues : [ "GET", "POST", "PUT", "HEAD", "DELETE" ], defaultValue : "POST" }); +QxRequest.addProperty( +{ + name : "method", + type : QxConst.TYPEOF_STRING, + possibleValues : [ + QxConst.METHOD_GET, QxConst.METHOD_POST, + QxConst.METHOD_PUT, QxConst.METHOD_HEAD, + QxConst.METHOD_DELETE + ], + defaultValue : QxConst.METHOD_POST +}); QxRequest.addProperty({ name : "asynchronous", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true }); QxRequest.addProperty({ name : "data", type : QxConst.TYPEOF_STRING }); QxRequest.addProperty({ name : "username", type : QxConst.TYPEOF_STRING }); @@ -126,7 +136,7 @@ return this.getState() === QxConst.REQUEST_STATE_SENDING; }; -proto.isLoading = function() { +proto.isReceiving = function() { return this.getState() === QxConst.REQUEST_STATE_RECEIVING; }; |