qooxdoo-commit Mailing List for qooxdoo (Page 1427)
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-24 12:26:47
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17044/source/test/user Modified Files: Tag: renderer Native_Window_1.html Log Message: cleaned up example from virtual mode Index: Native_Window_1.html =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/test/user/Attic/Native_Window_1.html,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -u -d -r1.1.2.11 -r1.1.2.12 --- Native_Window_1.html 24 Jan 2006 12:21:40 -0000 1.1.2.11 +++ Native_Window_1.html 24 Jan 2006 12:26:00 -0000 1.1.2.12 @@ -29,33 +29,6 @@ w1.setDimension(600, 400); - w1.addEventListener("ready", function() - { - this.getPane().setPadding(10); - - var a1 = new QxAtom("Welcome to your first own QxNativeWindow.<br/>Have fun!", "icons/32/favorites.png"); - a1.set({ top: 0, left: 0 }); - this.add(a1); - - var btnpack = new QxButton("Pack Window", "icons/16/penguin.png"); - btnpack.setLocation(0, 40); - btnpack.addEventListener("click", function(e) { - w1.pack(); - }); - - var btn1 = new QxButton("Yes, do it so", "icons/16/buttonok.png"); - btn1.set({ top: 70, left : 0 }); - btn1.addEventListener("click", function(e) { alert("Yes"); }); - - var btn2 = new QxButton("No, please not", "icons/16/buttoncancel.png"); - btn2.set({ top: 70, right : 0 }); - btn2.addEventListener("click", function(e) { alert("No"); }); - - this.add(btn1, btn2); - }); - - - |
|
From: Sebastian W. <wp...@us...> - 2006-01-24 12:24:09
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16310/source/script/gui Modified Files: Tag: renderer QxNativeWindow.js Log Message: Minor improvements Index: QxNativeWindow.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/gui/Attic/QxNativeWindow.js,v retrieving revision 1.1.2.18 retrieving revision 1.1.2.19 diff -u -d -r1.1.2.18 -r1.1.2.19 --- QxNativeWindow.js 24 Jan 2006 12:21:40 -0000 1.1.2.18 +++ QxNativeWindow.js 24 Jan 2006 12:23:53 -0000 1.1.2.19 @@ -157,8 +157,16 @@ proto._modifyPosition = function(propValue, propOldValue, propName) { - if (!this.isClosed()) { - this._window.moveTo(this.getLeft(), this.getTop()); + if (!this.isClosed()) + { + try + { + this._window.moveTo(this.getLeft(), this.getTop()); + } + catch(ex) + { + this.error("Cross-Domain Scripting problem: Could not move window!"); + }; }; return true; @@ -192,6 +200,8 @@ + + /* --------------------------------------------------------------------------- NAME |
|
From: Sebastian W. <wp...@us...> - 2006-01-24 12:21:50
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15560/source/script/core Modified Files: Tag: renderer QxConst.js Log Message: Fixed modal handling, many improvements Index: QxConst.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxConst.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 --- QxConst.js 20 Jan 2006 14:38:43 -0000 1.1.2.23 +++ QxConst.js 24 Jan 2006 12:21:40 -0000 1.1.2.24 @@ -248,6 +248,7 @@ EVENT_TYPE_INPUT : "input", EVENT_TYPE_LOAD : "load", EVENT_TYPE_UNLOAD : "unload", + EVENT_TYPE_BEFOREUNLOAD : "beforeunload", EVENT_TYPE_PROPERTYCHANGE : "propertychange", EVENT_TYPE_LOSECAPTURE : "losecapture", |
|
From: Sebastian W. <wp...@us...> - 2006-01-24 12:21:50
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15560/source/script/gui Modified Files: Tag: renderer QxNativeWindow.js Log Message: Fixed modal handling, many improvements Index: QxNativeWindow.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/gui/Attic/QxNativeWindow.js,v retrieving revision 1.1.2.17 retrieving revision 1.1.2.18 diff -u -d -r1.1.2.17 -r1.1.2.18 --- QxNativeWindow.js 24 Jan 2006 08:39:21 -0000 1.1.2.17 +++ QxNativeWindow.js 24 Jan 2006 12:21:40 -0000 1.1.2.18 @@ -33,7 +33,20 @@ function QxNativeWindow(vUrl, vName) { QxTarget.call(this); + + + // ************************************************************************ + // TIMER + // ************************************************************************ + + this._timer = new QxTimer(100); + this._timer.addEventListener(QxConst.EVENT_TYPE_INTERVAL, this._oninterval, this); + + // ************************************************************************ + // INITIAL PROPERTIES + // ************************************************************************ + if (QxUtil.isValidString(vUrl)) { this.setUrl(vUrl); }; @@ -46,6 +59,11 @@ QxNativeWindow.extend(QxTarget, "QxNativeWindow"); /*! + If the window is open or closed +*/ +QxNativeWindow.addProperty({ name : "open", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); + +/*! The outer width of the window. */ QxNativeWindow.addProperty({ name : "width", defaultValue : 400 }); @@ -165,6 +183,11 @@ return true; }; +proto._modifyOpen = function(propValue, propOldValue, propData) +{ + propValue ? this._open() : this._close(); + return true; +}; @@ -214,28 +237,26 @@ --------------------------------------------------------------------------- */ -proto._isOpened = false; - proto.isClosed = function() { var vClosed = true; - try + if (this._window) { - if (this._window) { + try { vClosed = this._window.closed; - }; - } - catch(ex) {}; + } catch(ex) {}; + }; return vClosed; }; -proto.close = function() -{ - if (!this.isClosed()) { - this._window.close(); - }; +proto.open = function() { + this.setOpen(true); +}; + +proto.close = function() { + this.setOpen(false); }; @@ -252,8 +273,8 @@ --------------------------------------------------------------------------- */ -proto.open = function() -{ +proto._open = function() +{ /* ------------------------------------------------------------------------------ PRE CONFIGURE WINDOW @@ -312,28 +333,6 @@ conf += "modal=" + (this.getModal() ? "yes" : "no") + ","; - /* - ------------------------------------------------------------------------------ - TIMER - ------------------------------------------------------------------------------ - */ - - this._isOpened = false; - this._isLoaded = false; - this._readyState = 0; - - - /* - ------------------------------------------------------------------------------ - BLOCKER - ------------------------------------------------------------------------------ - */ - - if (this.getModal()) { - window.application.getClientWindow().getClientDocument().block(this); - }; - - /* @@ -348,21 +347,57 @@ this._window = window.open(this.getUrl(), this.getName(), conf); - if (!this._window) + if (this.isClosed()) { - this.debug("Window could not be opened. It seems there is a popup blocker active!"); + this.error("Window could not be opened. It seems, there is a popup blocker active!", "_open"); + } + else + { + // start timer for close detection + this._timer.start(); + + // block original document + if (this.getModal()) + { + var vClientWindow = window.application.getClientWindow(); + + if (vClientWindow) { + vClientWindow.getClientDocument().block(this); + }; + }; + }; +}; - // release window again - if (this.getModal()) { - window.application.getClientWindow().getClientDocument().release(this); - }; +proto._close = function() +{ + if (!this._window) { + return; }; + + // stop timer for close detection + this._timer.stop(); + + // release window again + if (this.getModal()) + { + var vClientWindow = window.application.getClientWindow(); + + if (vClientWindow) { + vClientWindow.getClientDocument().release(this); + }; + }; + + // finally close window + if (!this.isClosed()) { + this._window.close(); + }; }; + /* --------------------------------------------------------------------------- CENTER SUPPORT @@ -383,10 +418,6 @@ proto._centerHelper = function(l, t) { - // to force the move of the window - this.forceLeft(0); - this.forceTop(0); - // set new values this.setLeft(l); this.setTop(t); @@ -427,6 +458,25 @@ + +/* +--------------------------------------------------------------------------- + EVENT HANDLING +--------------------------------------------------------------------------- +*/ + +proto._oninterval = function(e) +{ + if (this.isClosed()) { + this.setOpen(false); + }; +}; + + + + + + /* --------------------------------------------------------------------------- DISPOSER @@ -439,7 +489,7 @@ return; }; - if (this._window) + if (!this.isClosed()) { this.close(); this._window = null; |
|
From: Sebastian W. <wp...@us...> - 2006-01-24 12:21:50
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15560/source/test/user Modified Files: Tag: renderer Native_Window_1.html Log Message: Fixed modal handling, many improvements Index: Native_Window_1.html =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/test/user/Attic/Native_Window_1.html,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -u -d -r1.1.2.10 -r1.1.2.11 --- Native_Window_1.html 23 Jan 2006 17:04:31 -0000 1.1.2.10 +++ Native_Window_1.html 24 Jan 2006 12:21:40 -0000 1.1.2.11 @@ -19,8 +19,7 @@ <script type="text/javascript" src="../../../tools/script/demolayout.js"></script> <div id="testDescription"> - <p>Native Windows.</p> - <p>The virtual qooxdoo inside native windows does not work in IE currently!</p> + <p>Native Windows. Could be understand as an enhanced window.open with some additional options like to create modal windows.</p> </div> <script type="text/javascript"> |
|
From: Sebastian W. <wp...@us...> - 2006-01-24 12:21:50
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15560/source/script/widgets Modified Files: Tag: renderer QxClientDocument.js Log Message: Fixed modal handling, many improvements Index: QxClientDocument.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxClientDocument.js,v retrieving revision 1.7.2.66 retrieving revision 1.7.2.67 diff -u -d -r1.7.2.66 -r1.7.2.67 --- QxClientDocument.js 24 Jan 2006 09:55:57 -0000 1.7.2.66 +++ QxClientDocument.js 24 Jan 2006 12:21:40 -0000 1.7.2.67 @@ -154,7 +154,7 @@ proto.block = function(vActiveChild) { // this.debug("BLOCK: " + vActiveChild.toHashCode()); - + this._blocker.show(); if (typeof QxWindow == QxConst.TYPEOF_FUNCTION && vActiveChild instanceof QxWindow) @@ -175,7 +175,7 @@ proto.release = function(vActiveChild) { // this.debug("RELEASE: " + vActiveChild.toHashCode()); - + if (vActiveChild) { if (vActiveChild instanceof QxNativeWindow) |
|
From: Sebastian W. <wp...@us...> - 2006-01-24 09:56:09
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4151/source/script/widgets Modified Files: Tag: renderer QxClientDocument.js Log Message: Minor fix Index: QxClientDocument.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxClientDocument.js,v retrieving revision 1.7.2.65 retrieving revision 1.7.2.66 diff -u -d -r1.7.2.65 -r1.7.2.66 --- QxClientDocument.js 16 Jan 2006 16:11:56 -0000 1.7.2.65 +++ QxClientDocument.js 24 Jan 2006 09:55:57 -0000 1.7.2.66 @@ -137,7 +137,7 @@ proto.blockHelper = function(e) { - if (this._modalNativeWindow && this._modalNativeWindow.getReady()) + if (this._modalNativeWindow) { try { |
|
From: Sebastian W. <wp...@us...> - 2006-01-24 09:41:08
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32197/source/script/transport Modified Files: Tag: renderer QxXmlHttpTransport.js Log Message: Minor improvement Index: QxXmlHttpTransport.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/transport/Attic/QxXmlHttpTransport.js,v retrieving revision 1.1.2.17 retrieving revision 1.1.2.18 diff -u -d -r1.1.2.17 -r1.1.2.18 --- QxXmlHttpTransport.js 20 Jan 2006 14:42:18 -0000 1.1.2.17 +++ QxXmlHttpTransport.js 24 Jan 2006 09:40:59 -0000 1.1.2.18 @@ -327,7 +327,9 @@ proto._onreadystatechange = function(e) { - while (this._lastReadyState < this.getRequest().readyState) { + var vReadyState = this.getRequest().readyState; + + while (this._lastReadyState < vReadyState) { this.setState(QxXmlHttpTransport._nativeMap[++this._lastReadyState]); }; }; |
|
From: Sebastian W. <wp...@us...> - 2006-01-24 08:45:46
|
Update of /cvsroot/qooxdoo/qooxdoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13285 Modified Files: Tag: renderer CHANGELOG Log Message: Updated Index: CHANGELOG =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/Attic/CHANGELOG,v retrieving revision 1.1.2.35 retrieving revision 1.1.2.36 diff -u -d -r1.1.2.35 -r1.1.2.36 --- CHANGELOG 24 Jan 2006 08:18:18 -0000 1.1.2.35 +++ CHANGELOG 24 Jan 2006 08:45:31 -0000 1.1.2.36 @@ -1,3 +1,11 @@ +2006-01-24 09:39 wpbasti + + * source/script/gui/QxNativeWindow.js: Fixed ugly bug + +2006-01-24 09:18 wpbasti + + * CHANGELOG: Updated + 2006-01-23 18:04 wpbasti * source/: script/gui/QxNativeWindow.js, |
|
From: Sebastian W. <wp...@us...> - 2006-01-24 08:39:32
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11374/source/script/gui Modified Files: Tag: renderer QxNativeWindow.js Log Message: Fixed ugly bug Index: QxNativeWindow.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/gui/Attic/QxNativeWindow.js,v retrieving revision 1.1.2.16 retrieving revision 1.1.2.17 diff -u -d -r1.1.2.16 -r1.1.2.17 --- QxNativeWindow.js 23 Jan 2006 17:04:30 -0000 1.1.2.16 +++ QxNativeWindow.js 24 Jan 2006 08:39:21 -0000 1.1.2.17 @@ -155,10 +155,11 @@ return true; }; -proto._modifyUrl = function(propValue, propOldValue, propName) { - +proto._modifyUrl = function(propValue, propOldValue, propName) +{ + // String hack needed for old compressor (compile.py) if(!this.isClosed()) { - this._window.location.replace(QxUtil.isValidString(propValue) ? propValue : ("javascript://")); + this._window.location.replace(QxUtil.isValidString(propValue) ? propValue : ("javascript:/" + "/")); }; return true; |
|
From: Sebastian W. <wp...@us...> - 2006-01-24 08:18:27
|
Update of /cvsroot/qooxdoo/qooxdoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4542 Modified Files: Tag: renderer CHANGELOG Log Message: Updated Index: CHANGELOG =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/Attic/CHANGELOG,v retrieving revision 1.1.2.34 retrieving revision 1.1.2.35 diff -u -d -r1.1.2.34 -r1.1.2.35 --- CHANGELOG 20 Jan 2006 19:02:37 -0000 1.1.2.34 +++ CHANGELOG 24 Jan 2006 08:18:18 -0000 1.1.2.35 @@ -1,3 +1,113 @@ +2006-01-23 18:04 wpbasti + + * source/: script/gui/QxNativeWindow.js, + test/user/Native_Window_1.html: renamed source to url property + +2006-01-23 18:02 wpbasti + + * TODO, source/script/core/QxObjectCore.js, + source/script/gui/QxNativeWindow.js, + source/test/user/Native_Window_1.html: Cleaned up 'virtual' mode + from QxNativeWindow + +2006-01-23 17:10 wpbasti + + * source/script/core/: QxExtend.js, QxObjectCore.js: Minor fix + +2006-01-23 17:01 wpbasti + + * TODO, source/script/core/QxExtend.js: Minor improvements + +2006-01-23 16:26 wpbasti + + * source/script/core/QxExtend.js: Use lightweight setter for many + properties + +2006-01-23 16:17 wpbasti + + * source/script/: core/QxExtend.js, gui/QxNativeWindow.js, + gui/QxParent.js, gui/QxWidget.js, managers/QxSelectionManager.js, + managers/QxToolTipManager.js, widgets/QxCommonViewButton.js, + widgets/QxGallery.js, widgets/QxGalleryList.js, + widgets/QxMenuRadioButton.js, widgets/QxRadioButton.js, + widgets/QxToolBarRadioButton.js, widgets/QxToolTip.js: Enhanced + type checks for property creation, fixed many outstanding bugs in + this area, too + +2006-01-23 15:50 wpbasti + + * source/script/core/QxExtend.js: Back to old version because new + one was dramatically slower + +2006-01-23 14:28 wpbasti + + * TODO, source/script/core/QxExtend.js: Initial split out of + property setters + +2006-01-23 13:45 wpbasti + + * source/script/core/QxExtend.js: Minor cleanup + +2006-01-23 13:43 wpbasti + + * source/script/core/QxObject.js, source/script/core/QxTimer.js, + source/script/gui/QxWidget.js, tools/config.sh, + source/script/core/QxObjectCore.js: Improved code and structure + of QxObject, some cleanups + +2006-01-23 13:28 wpbasti + + * TODO, source/script/core/QxTarget.js, + source/script/core/QxUtil.js: Some code, comment and block + improvements + +2006-01-23 13:04 wpbasti + + * TODO, source/script/managers/QxImageManager.js: Reduced buildURI + calls for image handling + +2006-01-23 12:24 wpbasti + + * source/test/developer/Umlauts_1.html: Changed description + +2006-01-23 12:14 wpbasti + + * TODO, source/script/core/QxCompare.js, + source/script/core/QxNative.js, source/script/core/QxUtil.js, + source/test/developer/Umlauts_1.html: Improved Umlauts handling, + removed hardcoded ISO characters + +2006-01-22 21:21 wpbasti + + * tools/: compileng.py, compileng_compress.xsl: Added new (forced) + space handling for some protected names + +2006-01-22 19:32 wpbasti + + * tools/compileng_compress.xsl: Improved blocks + +2006-01-22 19:26 wpbasti + + * tools/compileng_structure.xsl: Enhanced namegroup handling for + properties + +2006-01-22 19:06 wpbasti + + * source/script/managers/QxManager.js: Minor enhancements + +2006-01-22 19:05 wpbasti + + * tools/: compileng.py, compileng_compress.xsl: Added else block + support + +2006-01-22 18:58 wpbasti + + * source/script/gui/QxWidget.js: Minor improvements + +2006-01-20 20:02 wpbasti + + * CHANGELOG: Updated + 2006-01-20 19:25 wpbasti * source/test/user/Transport_1.html: Minor fix |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 17:04:39
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20109/source/script/gui Modified Files: Tag: renderer QxNativeWindow.js Log Message: renamed source to url property Index: QxNativeWindow.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/gui/Attic/QxNativeWindow.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 --- QxNativeWindow.js 23 Jan 2006 17:02:20 -0000 1.1.2.15 +++ QxNativeWindow.js 23 Jan 2006 17:04:30 -0000 1.1.2.16 @@ -26,16 +26,16 @@ /* ************************************************************************ #package(nativewindow) -#require(QxClientDocument) +#post(QxClientDocument) ************************************************************************ */ -function QxNativeWindow(vSource, vName) +function QxNativeWindow(vUrl, vName) { QxTarget.call(this); - if (QxUtil.isValidString(vSource)) { - this.setSource(vSource); + if (QxUtil.isValidString(vUrl)) { + this.setUrl(vUrl); }; if (QxUtil.isValidString(vName)) { @@ -71,9 +71,9 @@ QxNativeWindow.addProperty({ name : "modal", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); /*! - The source url + The url */ -QxNativeWindow.addProperty({ name : "source", type : QxConst.TYPEOF_STRING }); +QxNativeWindow.addProperty({ name : "url", type : QxConst.TYPEOF_STRING }); /*! The window name @@ -155,7 +155,7 @@ return true; }; -proto._modifySource = function(propValue, propOldValue, propName) { +proto._modifyUrl = function(propValue, propOldValue, propName) { if(!this.isClosed()) { this._window.location.replace(QxUtil.isValidString(propValue) ? propValue : ("javascript://")); @@ -345,7 +345,7 @@ this.setName("w" + this.toHashCode()); }; - this._window = window.open(this.getSource(), this.getName(), conf); + this._window = window.open(this.getUrl(), this.getName(), conf); if (!this._window) { |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 17:04:39
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20109/source/test/user Modified Files: Tag: renderer Native_Window_1.html Log Message: renamed source to url property Index: Native_Window_1.html =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/test/user/Attic/Native_Window_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 --- Native_Window_1.html 23 Jan 2006 17:02:20 -0000 1.1.2.9 +++ Native_Window_1.html 23 Jan 2006 17:04:31 -0000 1.1.2.10 @@ -153,9 +153,9 @@ tf6.setLocation(0, 2); tf6.setWidth(150); - var btn6 = new QxButton("Set Source", "icons/16/buttonok.png"); + var btn6 = new QxButton("Set Url", "icons/16/buttonok.png"); btn6.setLocation(155, 0); - btn6.addEventListener("click", function() { w1.setSource(tf6.getValue()); }); + btn6.addEventListener("click", function() { w1.setUrl(tf6.getValue()); }); |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 17:02:35
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18865/source/test/user Modified Files: Tag: renderer Native_Window_1.html Log Message: Cleaned up 'virtual' mode from QxNativeWindow Index: Native_Window_1.html =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/test/user/Attic/Native_Window_1.html,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -d -r1.1.2.8 -r1.1.2.9 --- Native_Window_1.html 19 Jan 2006 14:46:56 -0000 1.1.2.8 +++ Native_Window_1.html 23 Jan 2006 17:02:20 -0000 1.1.2.9 @@ -26,19 +26,9 @@ <script type="text/javascript"> window.application.main = function() { - var w1 = new QxNativeWindow("My first QxNativeWindow"); - - w1.setDimension(280, 170); - - //w1.setSource("http://www.google.de"); - - w1.addEventListener("ready", function() { - this.debug("window fired ready event"); - }); + var w1 = new QxNativeWindow("http://www.google.com"); - w1.addEventListener("load", function() { - this.debug("window fired load event"); - }); + w1.setDimension(600, 400); w1.addEventListener("ready", function() { @@ -86,18 +76,20 @@ + + var l = new QxVerticalBoxLayout; l.setLocation(20, 96); l.setWidth("auto"); l.setHeight("auto"); d.add(l); - var fs1 = new QxFieldSet("Settings (initial)"); + var fs1 = new QxFieldSet("Initial Settings"); fs1.setHeight("auto"); l.add(fs1); - var chk1 = new QxCheckBox("Resizeable (Could be disabled at runtime, too)"); + var chk1 = new QxCheckBox("Resizeable"); chk1.setLocation(0, 0); chk1.setChecked(true); chk1.addEventListener("changeChecked", function(e) { @@ -132,103 +124,78 @@ w1.setShowToolbar(e.getNewValue()); }); - var chk6 = new QxCheckBox("Allow Scrollbars (do not work here, omitted by CSS)"); + var chk6 = new QxCheckBox("Allow Scrollbars"); chk6.setLocation(0, 100); chk6.setChecked(false); chk6.addEventListener("changeChecked", function(e) { w1.setAllowScrollbars(e.getNewValue()); }); + + var chkb2 = new QxCheckBox("Modal"); + chkb2.setLocation(0, 120); + chkb2.setChecked(false); + chkb2.addEventListener("changeChecked", function(e) { w1.setModal(e.getNewValue()); }); - fs1.add(chk1, chk2, chk3, chk4, chk5, chk6); + fs1.add(chk1, chk2, chk3, chk4, chk5, chk6, chkb2); - var fs2 = new QxFieldSet("Settings (initial and runtime)"); - fs2.setHeight("auto"); - l.add(fs2); - var tf1 = new QxTextField("My first QxNativeWindow"); - tf1.setLocation(0, 2); - tf1.setWidth(150); - var btn1 = new QxButton("Set Caption", "icons/16/buttonok.png"); - btn1.setLocation(155, 0); - btn1.addEventListener("click", function() { w1.setCaption(tf1.getValue()); }); + var fs2 = new QxFieldSet("Runtime Settings"); + fs2.setHeight("auto"); + l.add(fs2); - var tf6 = new QxTextField(); - tf6.setLocation(0, 32); + var tf6 = new QxTextField("http://www.google.com"); + tf6.setLocation(0, 2); tf6.setWidth(150); var btn6 = new QxButton("Set Source", "icons/16/buttonok.png"); - btn6.setLocation(155, 30); + btn6.setLocation(155, 0); btn6.addEventListener("click", function() { w1.setSource(tf6.getValue()); }); - var chkb1 = new QxCheckBox("Show Caption"); - chkb1.setLocation(0, 60); - chkb1.setChecked(true); - chkb1.addEventListener("changeChecked", function(e) { w1.setShowCaption(e.getNewValue()); }); - - var chkb2 = new QxCheckBox("Modal (initial add modal=yes for gecko)"); - chkb2.setLocation(0, 80); - chkb2.setChecked(false); - chkb2.addEventListener("changeChecked", function(e) { w1.setModal(e.getNewValue()); }); - - var chkb3 = new QxCheckBox("Moveable"); - chkb3.setLocation(0, 100); - chkb3.setChecked(true); - chkb3.addEventListener("changeChecked", function(e) { w1.setMoveable(e.getNewValue()); }); - - - - var tf2 = new QxTextField("280"); - tf2.setLocation(0, 132); + var tf2 = new QxTextField("600"); + tf2.setLocation(0, 42); tf2.setWidth(50); var btn2 = new QxButton("Set Width", "icons/16/buttonok.png"); - btn2.setLocation(55, 130); + btn2.setLocation(55, 40); btn2.addEventListener("click", function() { w1.setWidth(parseInt(tf2.getValue())); }); - var btn4 = new QxButton("Auto", "icons/16/run.png"); - btn4.setLocation(140, 130); - btn4.addEventListener("click", function() { chk1.setChecked(false); w1.setWidth("auto"); }); - var tf3 = new QxTextField("170"); - tf3.setLocation(0, 162); + var tf3 = new QxTextField("400"); + tf3.setLocation(0, 72); tf3.setWidth(50); var btn3 = new QxButton("Set Height", "icons/16/buttonok.png"); - btn3.setLocation(55, 160); + btn3.setLocation(55, 70); btn3.addEventListener("click", function() { w1.setHeight(parseInt(tf3.getValue())); }); - var btn5 = new QxButton("Auto", "icons/16/run.png"); - btn5.setLocation(143, 160); - btn5.addEventListener("click", function() { chk1.setChecked(false); w1.setHeight("auto"); }); - var btn7 = new QxButton("Center to screen", "icons/16/kpersonalizer.png"); - btn7.setLocation(0, 200); + btn7.setLocation(0, 110); btn7.addEventListener("click", function() { w1.centerToScreen() }); var btn8 = new QxButton("Center to screen area", "icons/16/kpersonalizer.png"); - btn8.setLocation(0, 230); + btn8.setLocation(0, 140); btn8.addEventListener("click", function() { w1.centerToScreenArea() }); var btn9 = new QxButton("Center to opener", "icons/16/kpersonalizer.png"); - btn9.setLocation(0, 260); + btn9.setLocation(0, 170); btn9.addEventListener("click", function() { w1.centerToOpener() }); - fs2.add(tf1, btn1, tf6, btn6, chkb1, chkb2, chkb3, tf2, btn2, tf3, btn3, btn4, btn5, btn7, btn8, btn9); + fs2.add(tf6, btn6, tf2, btn2, tf3, btn3, btn7, btn8, btn9); }; </script> </body> |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 17:02:35
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18865/source/script/gui Modified Files: Tag: renderer QxNativeWindow.js Log Message: Cleaned up 'virtual' mode from QxNativeWindow Index: QxNativeWindow.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/gui/Attic/QxNativeWindow.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 --- QxNativeWindow.js 23 Jan 2006 15:17:13 -0000 1.1.2.14 +++ QxNativeWindow.js 23 Jan 2006 17:02:20 -0000 1.1.2.15 @@ -30,24 +30,14 @@ ************************************************************************ */ -function QxNativeWindow(vCaption, vSource, vName) +function QxNativeWindow(vSource, vName) { QxTarget.call(this); - this._timer = new QxTimer(100); - this._timer.addEventListener(QxConst.EVENT_TYPE_INTERVAL, this._ontimer, this); - - var o = this; - this.__onload = function(e) { return o._onload(e); }; - if (QxUtil.isValidString(vSource)) { this.setSource(vSource); }; - if (QxUtil.isValidString(vCaption)) { - this.setCaption(vCaption); - }; - if (QxUtil.isValidString(vName)) { this.setName(vName); }; @@ -68,12 +58,12 @@ /*! The left screen coordinate of the window. */ -QxNativeWindow.addProperty({ name : "left", type : QxConst.TYPEOF_NUMBER, defaultValue : 100 }); +QxNativeWindow.addProperty({ name : "left", type : QxConst.TYPEOF_NUMBER, defaultValue : 100, impl : "position" }); /*! The top screen coordinate of the window. */ -QxNativeWindow.addProperty({ name : "top", type : QxConst.TYPEOF_NUMBER, defaultValue : 200 }); +QxNativeWindow.addProperty({ name : "top", type : QxConst.TYPEOF_NUMBER, defaultValue : 200, impl : "position" }); /*! Should be window be modal @@ -81,11 +71,6 @@ QxNativeWindow.addProperty({ name : "modal", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); /*! - The text of the caption -*/ -QxNativeWindow.addProperty({ name : "caption", type : QxConst.TYPEOF_STRING }); - -/*! The source url */ QxNativeWindow.addProperty({ name : "source", type : QxConst.TYPEOF_STRING }); @@ -121,27 +106,19 @@ QxNativeWindow.addProperty({ name : "showToolbar", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); /*! - Should the caption be shown -*/ -QxNativeWindow.addProperty({ name : "showCaption", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true }); - -/*! If the window is resizeable */ QxNativeWindow.addProperty({ name : "resizeable", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true }); /*! - If the window is moveable -*/ -QxNativeWindow.addProperty({ name : "moveable", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true }); - -/*! If the window is able to scroll and has visible scrollbars if needed */ QxNativeWindow.addProperty({ name : "allowScrollbars", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); + + /* --------------------------------------------------------------------------- GROUPS @@ -153,113 +130,35 @@ -proto._defaultURI = "about:blank"; - -/* ---------------------------------------------------------------------------- - SUB WIDGET GETTER ---------------------------------------------------------------------------- -*/ - -proto.getPane = function() { - return this._pane; -}; - - - /* --------------------------------------------------------------------------- - MODIFIY ADDER LOGIC ---------------------------------------------------------------------------- -*/ - -proto.addToWindow = proto.add; - -proto.addToPane = function() { - this._pane.add.apply(this._pane, arguments); -}; - -// Overwrite default -proto.add = proto.addToPane; - - - - -/* ---------------------------------------------------------------------------- - COORDINATES + MODIFIERS --------------------------------------------------------------------------- */ -proto._modifyLeft = function(propValue, propOldValue, propName) { - return this._applyPosition(); -}; - -proto._modifyTop = function(propValue, propOldValue, propName) { - return this._applyPosition(); -}; - -proto._applyPosition = function() +proto._modifyPosition = function(propValue, propOldValue, propName) { - if (this._window && !this.isClosed()) { + if (!this.isClosed()) { this._window.moveTo(this.getLeft(), this.getTop()); }; return true; }; - - -/* ---------------------------------------------------------------------------- - CAPTION ---------------------------------------------------------------------------- -*/ - -proto._modifyCaption = function(propValue, propOldValue, propName) { - return this._applyCaption(); -}; - -proto._modifyShowCaption = function(propValue, propOldValue, propName) { - return this._applyCaption(); -}; - -proto._applyCaption = function() +proto._modifyName = function(propValue, propOldValue, propName) { - if (this._window && this._clientWindowInstance) - { - var v = ""; - - if (this.getShowCaption()) - { - var vc = this.getCaption(); - if (QxUtil.isValidString(vc)) { - v = vc; - }; - }; - - this._clientWindowInstance.getClientDocument().getDocumentElement().title = v; + if (!this.isClosed()) { + this._window.name = propValue; }; return true; }; - - - - - -/* ---------------------------------------------------------------------------- - SOURCE ---------------------------------------------------------------------------- -*/ - proto._modifySource = function(propValue, propOldValue, propName) { - if(this._window && this.isClosed() == false) { - this._window.location.replace(QxUtil.isValidString(propValue) ? propValue : ("javascript:/" + "/")); + if(!this.isClosed()) { + this._window.location.replace(QxUtil.isValidString(propValue) ? propValue : ("javascript://")); }; return true; @@ -268,6 +167,7 @@ + /* --------------------------------------------------------------------------- NAME @@ -276,7 +176,7 @@ proto.getName = function() { - if (this._window && !this.isClosed()) + if (!this.isClosed()) { try { @@ -303,14 +203,6 @@ }; -proto._modifyName = function(propValue, propOldValue, propName) -{ - if (this._window) { - this._window.name = propValue; - }; - - return true; -}; @@ -321,16 +213,8 @@ --------------------------------------------------------------------------- */ -proto._chromeCaptionSize = 24; - proto._isOpened = false; -proto._isLoaded = false; - -proto.isLoaded = function() { - return this._isLoaded; -}; - proto.isClosed = function() { var vClosed = true; @@ -348,14 +232,24 @@ proto.close = function() { - if (this._window) { + if (!this.isClosed()) { this._window.close(); }; }; -proto.getReady = function() { - return this._readyState == 5; -}; + + + + + + + + +/* +--------------------------------------------------------------------------- + OPEN METHOD +--------------------------------------------------------------------------- +*/ proto.open = function() { @@ -447,11 +341,11 @@ ------------------------------------------------------------------------------ */ - if ( QxUtil.isInvalidString(this.getName()) ) { + if (QxUtil.isInvalidString(this.getName())) { this.setName("w" + this.toHashCode()); }; - this._window = window.open(this._defaultURI, this.getName(), conf); + this._window = window.open(this.getSource(), this.getName(), conf); if (!this._window) { @@ -462,8 +356,6 @@ window.application.getClientWindow().getClientDocument().release(this); }; }; - - this._timer.restart(); }; @@ -477,15 +369,15 @@ */ proto.centerToScreen = function() { - return this._centerHelper((screen.width - this.getWidth()) / 2, (screen.height - this.getHeight() - this._chromeCaptionSize) / 2); + return this._centerHelper((screen.width - this.getWidth()) / 2, (screen.height - this.getHeight()) / 2); }; proto.centerToScreenArea = function() { - return this._centerHelper((screen.availWidth - this.getWidth()) / 2, (screen.availHeight - this.getHeight() - this._chromeCaptionSize) / 2); + return this._centerHelper((screen.availWidth - this.getWidth()) / 2, (screen.availHeight - this.getHeight()) / 2); }; proto.centerToOpener = function() { - return this._centerHelper(((QxDom.getWindowInnerWidth(window) - this.getWidth()) / 2) + QxDom.getComputedScreenBoxLeft(window.document.body), ((QxDom.getWindowInnerHeight(window) - this.getHeight() - this._chromeCaptionSize) / 2) + QxDom.getComputedScreenBoxTop(window.document.body)); + return this._centerHelper(((QxDom.getWindowInnerWidth(window) - this.getWidth()) / 2) + QxDom.getComputedScreenBoxLeft(window.document.body), ((QxDom.getWindowInnerHeight(window) - this.getHeight()) / 2) + QxDom.getComputedScreenBoxTop(window.document.body)); }; proto._centerHelper = function(l, t) @@ -499,7 +391,7 @@ this.setTop(t); // focus window if opened - if (this._window && !this.isClosed()) { + if (!this.isClosed()) { this.focus(); }; }; @@ -508,6 +400,7 @@ + /* --------------------------------------------------------------------------- FOCUS HANDLING @@ -516,17 +409,14 @@ proto.focus = function() { - if (this._window) { - try { - this._window.focus(); - } catch(ex) { - }; + if (!this.isClosed()) { + this._window.focus(); }; }; proto.blur = function() { - if (this._window) { + if (!this.isClosed()) { this._window.blur(); }; }; @@ -534,263 +424,6 @@ -/* ---------------------------------------------------------------------------- - TIMER ---------------------------------------------------------------------------- -*/ - -proto._ontimer = function(e) -{ - try - { - if (QxUtil.isValidNumber(this._readyState) && this._isOpened && (!this._window || (this._window && this.isClosed() != false))) - { - if (this.getModal()) { - window.application.getClientWindow().getClientDocument().release(this); - }; - - this._timer.stop(); - - if (this._clientWindowInstance) - { - this._clientWindowInstance.dispose(); - this._clientWindowInstance = null; - }; - - this._isOpened = false; - this._isLoaded = false; - this._readyState = null; - return; - }; - - if (!this._window || this._timerRun) { - return; - }; - - if (this._window) { - this._isOpened = true; - }; - } - catch(ex) - { - this.debug("QxNativeWindow: _ontimer: Error in window pre check handler: " + ex); - return; - }; - - this._timerRun = true; - - try - { - switch(this._readyState) - { - case 0: - this._isLoaded = false; - - var d = this._window.document; - if (d) - { - try { - this._window._QxNativeWindow = this; - } catch(ex) {}; - - if (QxUtil.isValidString(this.getSource())) - { - try - { - // in mshtml it seems not to work, even not for onreadystatechange - // (workaround see case 5 below) - QxDom.addEventListener(this._window, "load", this.__onload); - } - catch(ex) { - }; - - this._window.location.replace(this.getSource()); - this._timer.setInterval(500); - this._readyState = 5; - } - else - { - this._readyState = 1; - }; - - if (!this.getResizeable() && !QxClient.isMshtml()) - { - var w = this.getWidth(); - var h = this.getHeight(); - var win = this._window; - - this._window.addEventListener("resize", function(e) { win.resizeTo(w, h); }, false); - }; - }; - - break; - - case 1: - // Find stylesheet - var ls = document.getElementsByTagName("head")[0].getElementsByTagName("link"); - - for (var i=0, l=ls.length; i<l; i++) - { - if (ls[i].getAttribute("href").indexOf("qooxdoo.css") != -1) - { - var s = ls[i].getAttribute("href"); - break; - }; - }; - - // Building new document - var d = this._window.document; - - d.open("text/html", true); - - d.write('<?xml version="1.0" encoding="iso-8859-1"?>'); - - // Some magick for our optimizer - d.write('<!DOCTYPE html PUBLIC "-/' + '/W3C/' + '/DTD XHTML 1.1/' + '/EN" "http:/' + '/www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'); - d.write('<html xmlns="http:/' + '/www.w3.org/1999/xhtml" xml:lang="en">'); - - d.write('<head>'); - d.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />'); - d.write('<meta http-equiv="MsThemeCompatible" content="yes" />'); - d.write('<meta http-equiv="ImageToolBar" content="no" />'); - d.write('<meta http-equiv="Pragma" content="no-cache" />'); - d.write('<meta http-equiv="Expires" content="-1" />'); - d.write('<meta http-equiv="Cache-Control" content="no-cache" />'); - d.write('<meta name="MSSmartTagsPreventParsing" content="yes" />'); - - if (this.getShowCaption()) { - d.write('<title>' + this.getCaption() + '</title>'); - }; - - if (QxUtil.isValidString(s)) { - d.write('<link type="text/css" rel="StyleSheet" href="' + s + '"/>'); - }; - - d.write('</head><body></body></html>'); - - d.close(); - - this._readyState++; - - break; - - case 2: - var d = this._window.document; - if (d && d.body) - { - this._clientWindowInstance = new QxClientWindow(this._window); - this._pane = this._clientWindowInstance.getClientDocument(); - - this._readyState++; - }; - - break; - - case 3: - try{ - if (this.hasEventListeners("ready")) { - this.dispatchEvent(new QxEvent("ready")); - }; - } - catch(ex) - { - this.debug("Error in ready implementation: " + ex); - this._timer.stop(); - }; - - this._readyState++; - - break; - - case 4: - this.focus(); - this._readyState++; - - this._onload(); - - if (this._clientWindowInstance) { - QxWidget.flushGlobalQueues(); - }; - - this._timer.setInterval(500); - this._timer.restart(); - break; - - case 5: - // workaround for mshtml (see case 0 below) - try { - if (this._window.document.readyState == "complete") { - this._onload(); - }; - } catch(ex) {}; - - if (!this.getMoveable()) { - try{ - this._window.moveTo(this.getLeft(), this.getTop()); - } catch(ex) {}; - }; - - if (!this.getResizeable() && (this.getWidth() == "auto" || this.getHeight() == "auto")) - { - var w, h; - - if (this.getWidth() == "auto") { - w = this._clientWindowInstance.getClientDocument().getPreferredBoxWidth(); - }; - - if (this.getHeight() == "auto") { - h = this._clientWindowInstance.getClientDocument().getPreferredBoxHeight(); - }; - - if (QxUtil.isValidNumber(w) || QxUtil.isValidNumber(h)) - { - if (QxClient.isMshtml()) - { - try { - this._window.resizeTo(QxUtil.isValidNumber(w) ? w : this.getWidth(), QxUtil.isValidNumber(h) ? h + this._chromeCaptionSize : this.getHeight()); - } catch(ex) {}; - } - else - { - if (QxUtil.isValidNumber(w)) { - this._window.innerWidth = w; - }; - - if (QxUtil.isValidNumber(h)) { - // https://bugzilla.mozilla.org/show_bug.cgi?id=176320 - // Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 - if( this._window.innerHeight != 150 && h != 150) { - this._window.innerHeight = h; - }; - }; - }; - }; - }; - - break; - }; - } - catch(ex) - { - this.debug("QxNativeWindow: _ontimer: Error in window ready state handler: " + ex); - return; - }; - - delete this._timerRun; -}; - -proto._onload = function() -{ - if (!this._isLoaded) - { - this._isLoaded = true; - this.focus(); - this.dispatchEvent(new QxEvent("load")); - }; -}; - - /* @@ -805,49 +438,11 @@ return; }; - if (this._timer) - { - this._timer.removeEventListener("interval", this._ontimer, this); - this._timer.dispose(); - - this._timer = null; - }; - - if (this._clientWindowInstance) - { - this._clientWindowInstance.dispose(); - this._clientWindowInstance = null; - }; - - if (this._pane) - { - this._pane.dispose(); - this._pane = null; - }; - if (this._window) { - if (!this.isClosed()) - { - QxDom.removeEventListener(this._window, "load", this.__onload); - }; - this.close(); - - try - { - if (this._window._QxNativeWindow) - { - this._window._QxNativeWindow.dispose(); - this._window._QxNativeWindow = null; - }; - } - catch(ex) {}; - this._window = null; }; - this._readyState = null; - return QxTarget.prototype.dispose.call(this); }; |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 17:02:31
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18865/source/script/core Modified Files: Tag: renderer QxObjectCore.js Log Message: Cleaned up 'virtual' mode from QxNativeWindow Index: QxObjectCore.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxObjectCore.js,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- QxObjectCore.js 23 Jan 2006 16:10:07 -0000 1.1.2.2 +++ QxObjectCore.js 23 Jan 2006 17:02:19 -0000 1.1.2.3 @@ -68,4 +68,4 @@ QxObject.DEBUG_MSG_BEFORE = "[HASHCODE:"; QxObject.DEBUG_MSG_AFTER = "]"; QxObject.DEBUG_FUNCERRORPRE = "Failed to execute \""; -QxObject.DEBUG_FUNCERRORPOST = "()\": "; \ No newline at end of file +QxObject.DEBUG_FUNCERRORPOST = "()\": "; |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 17:02:31
|
Update of /cvsroot/qooxdoo/qooxdoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18865 Modified Files: Tag: renderer TODO Log Message: Cleaned up 'virtual' mode from QxNativeWindow Index: TODO =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/TODO,v retrieving revision 1.1.2.48 retrieving revision 1.1.2.49 diff -u -d -r1.1.2.48 -r1.1.2.49 --- TODO 23 Jan 2006 16:01:52 -0000 1.1.2.48 +++ TODO 23 Jan 2006 17:02:19 -0000 1.1.2.49 @@ -9,8 +9,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? -* Splitting QxNativeWindow (Move virtual mode to new class which itself inherits from the cleaned up QxNativeWindow) - h4. Layouter Rework * Discuss if it is useful to also cache hasPercentX, hasAutoX, ... |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 16:10:21
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29856/source/script/core Modified Files: Tag: renderer QxExtend.js QxObjectCore.js Log Message: Minor fix Index: QxObjectCore.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxObjectCore.js,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- QxObjectCore.js 23 Jan 2006 12:44:05 -0000 1.1.2.1 +++ QxObjectCore.js 23 Jan 2006 16:10:07 -0000 1.1.2.2 @@ -48,7 +48,9 @@ { if (typeof QxObjectDataBase[i] != QxConst.TYPEOF_UNDEFINED) { - QxObjectDataBase[i].dispose(); + try { + QxObjectDataBase[i].dispose(); + } catch(ex) {}; if (typeof QxObjectDataBase == QxConst.TYPEOF_UNDEFINED) { break; Index: QxExtend.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxExtend.js,v retrieving revision 1.7.2.106 retrieving revision 1.7.2.107 diff -u -d -r1.7.2.106 -r1.7.2.107 --- QxExtend.js 23 Jan 2006 16:01:52 -0000 1.7.2.106 +++ QxExtend.js 23 Jan 2006 16:10:07 -0000 1.7.2.107 @@ -502,7 +502,7 @@ }; // Allow to check and transform the new value before storage - if (typeof this[checkKey] === QxConst.TYPEOF_FUNCTION) + if (this[checkKey]) { try { @@ -523,7 +523,7 @@ this[valueKey] = newValue; // Check if there is a modifier implementation - if (typeof this[modifyKey] === QxConst.TYPEOF_FUNCTION) + if (this[modifyKey]) { try { @@ -597,7 +597,7 @@ }; // Allow to check and transform the new value before storage - if (typeof this[checkKey] === QxConst.TYPEOF_FUNCTION) + if (this[checkKey]) { try { @@ -618,7 +618,7 @@ this[valueKey] = newValue; // Check if there is a modifier implementation - if (typeof this[modifyKey] === QxConst.TYPEOF_FUNCTION) + if (this[modifyKey]) { try { |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 16:02:18
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26303/source/script/core Modified Files: Tag: renderer QxExtend.js Log Message: Minor improvements Index: QxExtend.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxExtend.js,v retrieving revision 1.7.2.105 retrieving revision 1.7.2.106 diff -u -d -r1.7.2.105 -r1.7.2.106 --- QxExtend.js 23 Jan 2006 15:26:26 -0000 1.7.2.105 +++ QxExtend.js 23 Jan 2006 16:01:52 -0000 1.7.2.106 @@ -478,11 +478,11 @@ var oldValue = this[valueKey]; - if (newValue == oldValue) { + if (newValue === oldValue) { return newValue; }; - if (!(newValue == null && p.allowNull)) + if (!(p.allowNull && newValue == null)) { 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); @@ -502,14 +502,14 @@ }; // Allow to check and transform the new value before storage - if (typeof this[checkKey] == QxConst.TYPEOF_FUNCTION) + 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) { + if (newValue === oldValue) { return newValue; }; } @@ -523,7 +523,7 @@ this[valueKey] = newValue; // Check if there is a modifier implementation - if (typeof this[modifyKey] == QxConst.TYPEOF_FUNCTION) + if (typeof this[modifyKey] === QxConst.TYPEOF_FUNCTION) { try { @@ -559,20 +559,18 @@ // Create Event if (this.hasEventListeners && this.hasEventListeners(changeKey)) { - var ce = new QxDataEvent(changeKey, newValue, oldValue, false); + var vEvent = new QxDataEvent(changeKey, newValue, oldValue, false); - ce.setTarget(this); + vEvent.setTarget(this); try { - this.dispatchEvent(ce, true); + this.dispatchEvent(vEvent, true); } catch(ex) { throw new Error("Property " + p.name + " modified: Failed to dispatch change event: " + ex); }; - - ce = null; }; return newValue; @@ -587,11 +585,11 @@ var oldValue = this[valueKey]; - if (newValue == oldValue) { + if (newValue === oldValue) { return newValue; }; - if (!(newValue == null && p.allowNull)) + if (!(p.allowNull && newValue == null)) { 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); @@ -599,14 +597,14 @@ }; // Allow to check and transform the new value before storage - if (typeof this[checkKey] == QxConst.TYPEOF_FUNCTION) + 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) { + if (newValue === oldValue) { return newValue; }; } @@ -620,7 +618,7 @@ this[valueKey] = newValue; // Check if there is a modifier implementation - if (typeof this[modifyKey] == QxConst.TYPEOF_FUNCTION) + if (typeof this[modifyKey] === QxConst.TYPEOF_FUNCTION) { try { @@ -638,20 +636,18 @@ // Create Event if (this.hasEventListeners && this.hasEventListeners(changeKey)) { - var ce = new QxDataEvent(changeKey, newValue, oldValue, false); + var vEvent = new QxDataEvent(changeKey, newValue, oldValue, false); - ce.setTarget(this); + vEvent.setTarget(this); try { - this.dispatchEvent(ce, true); + this.dispatchEvent(vEvent, true); } catch(ex) { throw new Error("Property " + p.name + " modified: Failed to dispatch change event: " + ex); }; - - ce = null; }; return newValue; |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 16:02:04
|
Update of /cvsroot/qooxdoo/qooxdoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26303 Modified Files: Tag: renderer TODO Log Message: Minor improvements Index: TODO =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/TODO,v retrieving revision 1.1.2.47 retrieving revision 1.1.2.48 diff -u -d -r1.1.2.47 -r1.1.2.48 --- TODO 23 Jan 2006 13:28:25 -0000 1.1.2.47 +++ TODO 23 Jan 2006 16:01:52 -0000 1.1.2.48 @@ -4,9 +4,6 @@ * Discuss property names: "html", "text" and "content" for QxText, QxHtml and QxLabel. * 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. |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 15:26:34
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11758/source/script/core Modified Files: Tag: renderer QxExtend.js Log Message: Use lightweight setter for many properties Index: QxExtend.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxExtend.js,v retrieving revision 1.7.2.104 retrieving revision 1.7.2.105 diff -u -d -r1.7.2.104 -r1.7.2.105 --- QxExtend.js 23 Jan 2006 15:17:13 -0000 1.7.2.104 +++ QxExtend.js 23 Jan 2006 15:26:26 -0000 1.7.2.105 @@ -451,129 +451,211 @@ 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) + }; + + if (p.allowMultipleArguments || p.hasConvert || p.hasInstance || p.hasClassName || p.hasPossibleValues || p.hasUnitDetection || p.addToQueue || p.addToQueueRuntime || p.addToStateQueue) { - // convert multiple arguments to array - if (p.allowMultipleArguments && arguments.length > 1) { - newValue = QxUtil.convertArgumentsToArray(arguments); - }; - - // support converter methods - if (p.hasConvert) + // building setFoo(): Setup new value, do type and change detection, converting types, call unit detection, ... + pp[QxConst.INTERNAL_SET + p.method] = function(newValue) { - try - { - newValue = p.convert.call(this, newValue, p); - } - catch(ex) + // convert multiple arguments to array + if (p.allowMultipleArguments && arguments.length > 1) { + newValue = QxUtil.convertArgumentsToArray(arguments); + }; + + // support converter methods + if (p.hasConvert) { - throw new Error("Attention! Could not convert new value for " + p.name + ": " + newValue + ": " + ex); + 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); + var oldValue = this[valueKey]; + + if (newValue == oldValue) { + return newValue; }; - - 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 (!(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); + }; }; - - 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); + }; }; - }; - - // Allow to check and transform the new value before storage - if (typeof this[checkKey] == QxConst.TYPEOF_FUNCTION) - { - try + + // Store new value + this[valueKey] = newValue; + + // Check if there is a modifier implementation + if (typeof this[modifyKey] == QxConst.TYPEOF_FUNCTION) { - newValue = this[checkKey](newValue, p); - - // Don't do anything if new value is indentical to old value - if (newValue == oldValue) { - return newValue; - }; + 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); } - catch(ex) + else if (p.addToQueueRuntime) { + this.addToQueueRuntime(p.name); + }; + + // Auto state queue addition support + if (p.addToStateQueue) { + this._addToGlobalStateQueue(); + }; + + // Create Event + if (this.hasEventListeners && this.hasEventListeners(changeKey)) { - return this.error("Failed to check property " + p.name + ": " + ex, checkKey); + 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; }; - - // Store new value - this[valueKey] = newValue; - - // Check if there is a modifier implementation - if (typeof this[modifyKey] == QxConst.TYPEOF_FUNCTION) + } + else + { + // building setFoo(): Setup new value, do type and change detection, converting types, call unit detection, ... + pp[QxConst.INTERNAL_SET + p.method] = function(newValue) { - try + // this.debug("Fast Setter: " + p.name); + + var oldValue = this[valueKey]; + + if (newValue == oldValue) { + return newValue; + }; + + if (!(newValue == null && p.allowNull)) { - var r = this[modifyKey](newValue, oldValue, p); - if (!r) { - return this.error("Modification of property \"" + p.name + "\" failed without exception (" + r + ")", modifyKey); + 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); }; - } - catch(ex) + }; + + // Allow to check and transform the new value before storage + if (typeof this[checkKey] == QxConst.TYPEOF_FUNCTION) { - return this.error("Modification of property \"" + p.name + "\" failed with exception (" + ex + ")", modifyKey); + 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); + }; }; - }; - - // 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 + + // Store new value + this[valueKey] = newValue; + + // Check if there is a modifier implementation + if (typeof this[modifyKey] == QxConst.TYPEOF_FUNCTION) { - this.dispatchEvent(ce, true); - } - catch(ex) + 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); + }; + }; + + // Create Event + if (this.hasEventListeners && this.hasEventListeners(changeKey)) { - throw new Error("Property " + p.name + " modified: Failed to dispatch change event: " + ex); + 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; }; - - ce = null; - }; - - return newValue; + + return newValue; + }; }; // building user configured get alias for property |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 15:17:36
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/managers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8458/source/script/managers Modified Files: Tag: renderer QxSelectionManager.js QxToolTipManager.js Log Message: Enhanced type checks for property creation, fixed many outstanding bugs in this area, too Index: QxSelectionManager.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/managers/QxSelectionManager.js,v retrieving revision 1.3.2.32 retrieving revision 1.3.2.33 diff -u -d -r1.3.2.32 -r1.3.2.33 --- QxSelectionManager.js 16 Jan 2006 16:11:56 -0000 1.3.2.32 +++ QxSelectionManager.js 23 Jan 2006 15:17:13 -0000 1.3.2.33 @@ -89,7 +89,7 @@ /*! Grid selection */ -QxSelectionManager.addProperty({ name : "multiColumnSupport", type : Boolean, defaultValue : false }); +QxSelectionManager.addProperty({ name : "multiColumnSupport", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); Index: QxToolTipManager.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/managers/QxToolTipManager.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 --- QxToolTipManager.js 16 Jan 2006 16:11:56 -0000 1.1.2.15 +++ QxToolTipManager.js 23 Jan 2006 15:17:13 -0000 1.1.2.16 @@ -39,7 +39,7 @@ QxToolTipManager.extend(QxManager, "QxToolTipManager"); -QxToolTipManager.addProperty({ name : "currentToolTip" }); +QxToolTipManager.addProperty({ name : "currentToolTip", type : QxConst.TYPEOF_OBJECT, instance : "QxToolTip" }); |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 15:17:24
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8458/source/script/gui Modified Files: Tag: renderer QxNativeWindow.js QxParent.js QxWidget.js Log Message: Enhanced type checks for property creation, fixed many outstanding bugs in this area, too Index: QxNativeWindow.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/gui/Attic/QxNativeWindow.js,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -u -d -r1.1.2.13 -r1.1.2.14 --- QxNativeWindow.js 19 Jan 2006 14:46:55 -0000 1.1.2.13 +++ QxNativeWindow.js 23 Jan 2006 15:17:13 -0000 1.1.2.14 @@ -35,7 +35,7 @@ QxTarget.call(this); this._timer = new QxTimer(100); - this._timer.addEventListener("interval", this._ontimer, this); + this._timer.addEventListener(QxConst.EVENT_TYPE_INTERVAL, this._ontimer, this); var o = this; this.__onload = function(e) { return o._onload(e); }; @@ -58,87 +58,87 @@ /*! The outer width of the window. */ -QxNativeWindow.addProperty({ name : "width", defaultValue : 400, groups : [ "dimension" ] }); +QxNativeWindow.addProperty({ name : "width", defaultValue : 400 }); /*! The outer height of the window. */ -QxNativeWindow.addProperty({ name : "height", defaultValue : 250, groups : [ "dimension" ] }); +QxNativeWindow.addProperty({ name : "height", defaultValue : 250 }); /*! The left screen coordinate of the window. */ -QxNativeWindow.addProperty({ name : "left", type : Number, defaultValue : 100, groups : [ "location" ] }); +QxNativeWindow.addProperty({ name : "left", type : QxConst.TYPEOF_NUMBER, defaultValue : 100 }); /*! The top screen coordinate of the window. */ -QxNativeWindow.addProperty({ name : "top", type : Number, defaultValue : 200, groups : [ "location" ] }); +QxNativeWindow.addProperty({ name : "top", type : QxConst.TYPEOF_NUMBER, defaultValue : 200 }); /*! Should be window be modal */ -QxNativeWindow.addProperty({ name : "modal", type : Boolean, defaultValue : false }); +QxNativeWindow.addProperty({ name : "modal", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); /*! The text of the caption */ -QxNativeWindow.addProperty({ name : "caption", type : String }); +QxNativeWindow.addProperty({ name : "caption", type : QxConst.TYPEOF_STRING }); /*! The source url */ -QxNativeWindow.addProperty({ name : "source", type : String }); +QxNativeWindow.addProperty({ name : "source", type : QxConst.TYPEOF_STRING }); /*! The window name */ -QxNativeWindow.addProperty({ name : "name", type : String }); +QxNativeWindow.addProperty({ name : "name", type : QxConst.TYPEOF_STRING }); /*! The text of the statusbar */ -QxNativeWindow.addProperty({ name : "status", type : String, defaultValue : "Ready" }); +QxNativeWindow.addProperty({ name : "status", type : QxConst.TYPEOF_STRING, defaultValue : "Ready" }); /*! Should the statusbar be shown */ -QxNativeWindow.addProperty({ name : "showStatusbar", type : Boolean, defaultValue : false }); +QxNativeWindow.addProperty({ name : "showStatusbar", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); /*! Should the menubar be shown */ -QxNativeWindow.addProperty({ name : "showMenubar", type : Boolean, defaultValue : false }); +QxNativeWindow.addProperty({ name : "showMenubar", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); /*! Should the location(bar) be shown */ -QxNativeWindow.addProperty({ name : "showLocation", type : Boolean, defaultValue : false }); +QxNativeWindow.addProperty({ name : "showLocation", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); /*! Should the toolbar be shown */ -QxNativeWindow.addProperty({ name : "showToolbar", type : Boolean, defaultValue : false }); +QxNativeWindow.addProperty({ name : "showToolbar", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); /*! Should the caption be shown */ -QxNativeWindow.addProperty({ name : "showCaption", type : Boolean, defaultValue : true }); +QxNativeWindow.addProperty({ name : "showCaption", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true }); /*! If the window is resizeable */ -QxNativeWindow.addProperty({ name : "resizeable", type : Boolean, defaultValue : true }); +QxNativeWindow.addProperty({ name : "resizeable", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true }); /*! If the window is moveable */ -QxNativeWindow.addProperty({ name : "moveable", type : Boolean, defaultValue : true }); +QxNativeWindow.addProperty({ name : "moveable", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true }); /*! If the window is able to scroll and has visible scrollbars if needed */ -QxNativeWindow.addProperty({ name : "allowScrollbars", type : Boolean, defaultValue : false }); +QxNativeWindow.addProperty({ name : "allowScrollbars", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); Index: QxWidget.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/gui/Attic/QxWidget.js,v retrieving revision 1.1.2.50 retrieving revision 1.1.2.51 diff -u -d -r1.1.2.50 -r1.1.2.51 --- QxWidget.js 23 Jan 2006 12:43:47 -0000 1.1.2.50 +++ QxWidget.js 23 Jan 2006 15:17:13 -0000 1.1.2.51 @@ -107,7 +107,7 @@ /*! The parent widget (the real object, no ID or something) */ -QxWidget.addProperty({ name : "parent", defaultValue : null }); +QxWidget.addProperty({ name : "parent", type : QxConst.TYPEOF_OBJECT, instance : "QxParent", defaultValue : null }); /*! The element node (if the widget is created, otherwise null) @@ -298,12 +298,12 @@ /*! Contains the tooltip object connected to the widget. */ -QxWidget.addProperty({ name : "toolTip" }); +QxWidget.addProperty({ name : "toolTip", type : QxConst.TYPEOF_OBJECT, instance : "QxToolTip" }); /*! Contains the context menu object connected to the widget. (Need real implementation) */ -QxWidget.addProperty({ name : "contextMenu" }); +QxWidget.addProperty({ name : "contextMenu", type : QxConst.TYPEOF_OBJECT, instance : "QxMenu" }); /*! Capture all events and map them to this widget @@ -318,7 +318,7 @@ /*! A command called if the widget should be excecuted (a placeholder for buttons, ...) */ -QxWidget.addProperty({ name : "command" }); +QxWidget.addProperty({ name : "command", type : QxConst.TYPEOF_OBJECT, instance : "QxCommand" }); /*! Appearance of the widget Index: QxParent.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/gui/Attic/QxParent.js,v retrieving revision 1.1.2.20 retrieving revision 1.1.2.21 diff -u -d -r1.1.2.20 -r1.1.2.21 --- QxParent.js 17 Jan 2006 13:47:11 -0000 1.1.2.20 +++ QxParent.js 23 Jan 2006 15:17:13 -0000 1.1.2.21 @@ -61,17 +61,17 @@ /*! Individual focus manager for all child elements. */ -QxParent.addProperty({ name : "focusManager" }); +QxParent.addProperty({ name : "focusManager", type : QxConst.TYPEOF_OBJECT, instance : "QxFocusManager" }); /*! The current active child. */ -QxParent.addProperty({ name : "activeChild" }); +QxParent.addProperty({ name : "activeChild", type : QxConst.TYPEOF_OBJECT, instance : "QxWidget" }); /*! The current focused child. */ -QxParent.addProperty({ name : "focusedChild" }); +QxParent.addProperty({ name : "focusedChild", type : QxConst.TYPEOF_OBJECT, instance : "QxWidget" }); |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 15:17:21
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8458/source/script/widgets Modified Files: Tag: renderer QxCommonViewButton.js QxGallery.js QxGalleryList.js QxMenuRadioButton.js QxRadioButton.js QxToolBarRadioButton.js QxToolTip.js Log Message: Enhanced type checks for property creation, fixed many outstanding bugs in this area, too Index: QxGallery.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxGallery.js,v retrieving revision 1.21.2.8 retrieving revision 1.21.2.9 diff -u -d -r1.21.2.8 -r1.21.2.9 --- QxGallery.js 16 Jan 2006 16:11:56 -0000 1.21.2.8 +++ QxGallery.js 23 Jan 2006 15:17:13 -0000 1.21.2.9 @@ -67,11 +67,11 @@ --------------------------------------------------------------------------- */ -QxGallery.addProperty({ name : "thumbMaxWidth", type : Number, defaultValue : 100 }); -QxGallery.addProperty({ name : "thumbMaxHeight", type : Number, defaultValue : 100 }); -QxGallery.addProperty({ name : "decorHeight", type : Number, defaultValue : 40 }); -QxGallery.addProperty({ name : "showTitle", type : Boolean, defaultValue : true }); -QxGallery.addProperty({ name : "showComment", type : Boolean, defaultValue : true }); +QxGallery.addProperty({ name : "thumbMaxWidth", type : QxConst.TYPEOF_NUMBER, defaultValue : 100 }); +QxGallery.addProperty({ name : "thumbMaxHeight", type : QxConst.TYPEOF_NUMBER, defaultValue : 100 }); +QxGallery.addProperty({ name : "decorHeight", type : QxConst.TYPEOF_NUMBER, defaultValue : 40 }); +QxGallery.addProperty({ name : "showTitle", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true }); +QxGallery.addProperty({ name : "showComment", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true }); Index: QxToolBarRadioButton.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxToolBarRadioButton.js,v retrieving revision 1.1.2.17 retrieving revision 1.1.2.18 diff -u -d -r1.1.2.17 -r1.1.2.18 --- QxToolBarRadioButton.js 16 Jan 2006 16:11:57 -0000 1.1.2.17 +++ QxToolBarRadioButton.js 23 Jan 2006 15:17:13 -0000 1.1.2.18 @@ -48,7 +48,7 @@ /*! The assigned QxRadioManager which handles the switching between registered buttons */ -QxToolBarRadioButton.addProperty({ name : "manager", type : QxConst.TYPEOF_OBJECT, instance : QxRadioManager, allowNull : true }); +QxToolBarRadioButton.addProperty({ name : "manager", type : QxConst.TYPEOF_OBJECT, instance : "QxRadioManager", allowNull : true }); /*! The name of the radio group. All the radio elements in a group (registered by the same manager) Index: QxRadioButton.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxRadioButton.js,v retrieving revision 1.2.2.23 retrieving revision 1.2.2.24 diff -u -d -r1.2.2.23 -r1.2.2.24 --- QxRadioButton.js 16 Jan 2006 16:11:57 -0000 1.2.2.23 +++ QxRadioButton.js 23 Jan 2006 15:17:13 -0000 1.2.2.24 @@ -47,7 +47,7 @@ /*! The assigned QxRadioManager which handles the switching between registered buttons */ -QxRadioButton.addProperty({ name : "manager", type : QxConst.TYPEOF_OBJECT, instance : QxRadioManager, allowNull : true }); +QxRadioButton.addProperty({ name : "manager", type : QxConst.TYPEOF_OBJECT, instance : "QxRadioManager", allowNull : true }); Index: QxMenuRadioButton.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxMenuRadioButton.js,v retrieving revision 1.5.2.13 retrieving revision 1.5.2.14 diff -u -d -r1.5.2.13 -r1.5.2.14 --- QxMenuRadioButton.js 16 Jan 2006 16:11:57 -0000 1.5.2.13 +++ QxMenuRadioButton.js 23 Jan 2006 15:17:13 -0000 1.5.2.14 @@ -51,7 +51,7 @@ /*! The assigned QxRadioManager which handles the switching between registered buttons */ -QxMenuRadioButton.addProperty({ name : "manager", type : QxConst.TYPEOF_OBJECT, instance : QxRadioManager, allowNull : true }); +QxMenuRadioButton.addProperty({ name : "manager", type : QxConst.TYPEOF_OBJECT, instance : "QxRadioManager", allowNull : true }); Index: QxToolTip.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxToolTip.js,v retrieving revision 1.2.2.22 retrieving revision 1.2.2.23 diff -u -d -r1.2.2.22 -r1.2.2.23 --- QxToolTip.js 17 Jan 2006 13:47:13 -0000 1.2.2.22 +++ QxToolTip.js 23 Jan 2006 15:17:13 -0000 1.2.2.23 @@ -77,7 +77,7 @@ QxToolTip.addProperty({ name : "showInterval", type : QxConst.TYPEOF_NUMBER, defaultValue : 1000 }); QxToolTip.addProperty({ name : "hideInterval", type : QxConst.TYPEOF_NUMBER, defaultValue : 4000 }); -QxToolTip.addProperty({ name : "boundToWidget" }); +QxToolTip.addProperty({ name : "boundToWidget", type : QxConst.TYPEOF_OBJECT, instance : "QxWidget" }); Index: QxGalleryList.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxGalleryList.js,v retrieving revision 1.7.2.7 retrieving revision 1.7.2.8 diff -u -d -r1.7.2.7 -r1.7.2.8 --- QxGalleryList.js 16 Jan 2006 16:11:57 -0000 1.7.2.7 +++ QxGalleryList.js 23 Jan 2006 15:17:13 -0000 1.7.2.8 @@ -52,9 +52,9 @@ QxGalleryList.extend(QxTerminator, "QxGalleryList"); -QxGalleryList.addProperty({ name : "thumbMaxWidth", type : Number, defaultValue : 60 }); -QxGalleryList.addProperty({ name : "thumbMaxHeight", type : Number, defaultValue : 60 }); -QxGalleryList.addProperty({ name : "decorHeight", type : Number, defaultValue : 40 }); +QxGalleryList.addProperty({ name : "thumbMaxWidth", type : QxConst.TYPEOF_NUMBER, defaultValue : 60 }); +QxGalleryList.addProperty({ name : "thumbMaxHeight", type : QxConst.TYPEOF_NUMBER, defaultValue : 60 }); +QxGalleryList.addProperty({ name : "decorHeight", type : QxConst.TYPEOF_NUMBER, defaultValue : 40 }); proto.getManager = function() { return this._manager; Index: QxCommonViewButton.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/Attic/QxCommonViewButton.js,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -d -r1.1.2.6 -r1.1.2.7 --- QxCommonViewButton.js 16 Jan 2006 16:11:56 -0000 1.1.2.6 +++ QxCommonViewButton.js 23 Jan 2006 15:17:13 -0000 1.1.2.7 @@ -74,7 +74,7 @@ /*! The assigned QxRadioManager which handles the switching between registered buttons */ -QxCommonViewButton.addProperty({ name : "manager", type : QxConst.TYPEOF_OBJECT, instance : QxRadioManager, allowNull : true }); +QxCommonViewButton.addProperty({ name : "manager", type : QxConst.TYPEOF_OBJECT, instance : "QxRadioManager", allowNull : true }); /*! The name of the radio group. All the radio elements in a group (registered by the same manager) |
|
From: Sebastian W. <wp...@us...> - 2006-01-23 15:17:21
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8458/source/script/core Modified Files: Tag: renderer QxExtend.js Log Message: Enhanced type checks for property creation, fixed many outstanding bugs in this area, too Index: QxExtend.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxExtend.js,v retrieving revision 1.7.2.103 retrieving revision 1.7.2.104 diff -u -d -r1.7.2.103 -r1.7.2.104 --- QxExtend.js 23 Jan 2006 14:50:42 -0000 1.7.2.103 +++ QxExtend.js 23 Jan 2006 15:17:13 -0000 1.7.2.104 @@ -343,10 +343,47 @@ if (QxUtil.isInvalidBoolean(p.allowMultipleArguments)) { p.allowMultipleArguments = false; }; + + + + + + + if (typeof p.type == QxConst.TYPEOF_STRING) { + p.hasType = true; + } + else if (typeof p.type != QxConst.TYPEOF_UNDEFINED) { + throw new Error("Invalid type definition for property " + p.name + ": " + p.type); + } + else { + p.hasType = false; + }; + + if (typeof p.instance == QxConst.TYPEOF_STRING) { + p.hasInstance = true; + } + else if (typeof p.instance != QxConst.TYPEOF_UNDEFINED) { + throw new Error("Invalid instance definition for property " + p.name + ": " + p.instance); + } + else { + p.hasInstance = false; + }; + + if (typeof p.classname == QxConst.TYPEOF_STRING) { + p.hasClassName = true; + } + else if (typeof p.classname != QxConst.TYPEOF_UNDEFINED) { + throw new Error("Invalid classname definition for property " + p.name + ": " + p.classname); + } + else { + p.hasClassName = false; + }; + + + + + - p.hasType = QxUtil.isValidString(p.type); - p.hasInstance = QxUtil.isValidString(p.instance); - p.hasClassName = QxUtil.isValidString(p.classname); p.hasConvert = QxUtil.isValidFunction(p.convert); p.hasPossibleValues = QxUtil.isValidArray(p.possibleValues); p.hasUnitDetection = QxUtil.isValidString(p.unitDetection); |