Update of /cvsroot/qooxdoo/qooxdoo/source/script/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9898/source/script/core
Modified Files:
Tag: renderer
QxApplication.js QxConst.js QxExtend.js QxNative.js
QxObject.js QxObjectCore.js
Log Message:
Improved dependency informations
Index: QxObject.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxObject.js,v
retrieving revision 1.2.2.35
retrieving revision 1.2.2.36
diff -u -d -r1.2.2.35 -r1.2.2.36
--- QxObject.js 23 Jan 2006 12:43:46 -0000 1.2.2.35
+++ QxObject.js 27 Jan 2006 15:32:02 -0000 1.2.2.36
@@ -26,9 +26,11 @@
/* ************************************************************************
#package(core)
+#require(QxMain)
#require(QxExtend)
#require(QxConst)
#require(QxUtil)
+#post(QxClient)
#post(QxObjectCore)
************************************************************************ */
Index: QxConst.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxConst.js,v
retrieving revision 1.1.2.27
retrieving revision 1.1.2.28
diff -u -d -r1.1.2.27 -r1.1.2.28
--- QxConst.js 26 Jan 2006 10:32:52 -0000 1.1.2.27
+++ QxConst.js 27 Jan 2006 15:32:02 -0000 1.1.2.28
@@ -26,7 +26,6 @@
/* ************************************************************************
#package(core)
-#require(QxMain)
************************************************************************ */
Index: QxApplication.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxApplication.js,v
retrieving revision 1.2.2.60
retrieving revision 1.2.2.61
diff -u -d -r1.2.2.60 -r1.2.2.61
--- QxApplication.js 27 Jan 2006 11:05:10 -0000 1.2.2.60
+++ QxApplication.js 27 Jan 2006 15:32:02 -0000 1.2.2.61
@@ -26,7 +26,8 @@
/* ************************************************************************
#package(core)
-#post(QxClient)
+#require(QxClient)
+#require(QxDom)
#post(QxClientWindow)
#post(QxImageManager)
#post(QxImagePreloader)
@@ -37,6 +38,10 @@
************************************************************************ */
+function QxApplicationInit() {
+ window.application.init();
+};
+
/*!
This contains the main qooxdoo application.
@@ -48,14 +53,10 @@
{
QxTarget.call(this, false);
- function init() {
- window.application.init();
- };
-
if (QxClient.isGecko()) {
- QxDom.addEventListener(window, "DOMContentLoaded", init);
+ QxDom.addEventListener(window, "DOMContentLoaded", QxApplicationInit);
} else {
- QxDom.addEventListener(window, "load", init);
+ QxDom.addEventListener(window, "load", QxApplicationInit);
};
};
@@ -345,14 +346,19 @@
return;
};
- if (this._clientWindow)
- {
- this._clientWindow.dispose();
- this._clientWindow = null;
+ if (QxClient.isGecko()) {
+ QxDom.removeEventListener(window, "DOMContentLoaded", QxApplicationInit);
+ } else {
+ QxDom.removeEventListener(window, "load", QxApplicationInit);
};
+
+ this._clientWindow = null;
QxTarget.prototype.dispose.call(this);
+
QxObject.dispose();
+
+ window.application = null;
};
window.application = new QxApplication;
Index: QxExtend.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/QxExtend.js,v
retrieving revision 1.7.2.107
retrieving revision 1.7.2.108
diff -u -d -r1.7.2.107 -r1.7.2.108
--- QxExtend.js 23 Jan 2006 16:10:07 -0000 1.7.2.107
+++ QxExtend.js 27 Jan 2006 15:32:02 -0000 1.7.2.108
@@ -26,8 +26,7 @@
/* ************************************************************************
#package(core)
-#require(QxConst)
-#require(QxUtil)
+#require(QxNative)
************************************************************************ */
Index: QxObjectCore.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxObjectCore.js,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -d -r1.1.2.3 -r1.1.2.4
--- QxObjectCore.js 23 Jan 2006 17:02:19 -0000 1.1.2.3
+++ QxObjectCore.js 27 Jan 2006 15:32:02 -0000 1.1.2.4
@@ -44,23 +44,24 @@
QxObject.dispose = function()
{
+ // QxDebug("QxObject", "Disposing Application");
+
+ var vStart = (new Date).valueOf();
+ var vObject;
+
for (var i=QxObjectDataBase.length-1; i>=0; i--)
{
- if (typeof QxObjectDataBase[i] != QxConst.TYPEOF_UNDEFINED)
+ vObject = QxObjectDataBase[i];
+
+ if (vObject != null)
{
- try {
- QxObjectDataBase[i].dispose();
- } catch(ex) {};
-
- if (typeof QxObjectDataBase == QxConst.TYPEOF_UNDEFINED) {
- break;
- };
-
- delete QxObjectDataBase[i];
+ // QxDebug("QxObject", "Disposing: " + vObject);
+ vObject.dispose();
+ QxObjectDataBase[i] = null;
};
};
-
- delete QxObjectDataBase;
+
+ // QxDebug("QxObject", "Done in: " + ((new Date).valueOf() - vStart) + "ms");
};
QxObject.addProperty({ name : "enabled", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true, getAlias : "isEnabled" });
Index: QxNative.js
===================================================================
RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxNative.js,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -d -r1.1.2.9 -r1.1.2.10
--- QxNative.js 23 Jan 2006 11:14:09 -0000 1.1.2.9
+++ QxNative.js 27 Jan 2006 15:32:02 -0000 1.1.2.10
@@ -26,9 +26,6 @@
/* ************************************************************************
#package(core)
-#require(QxClient)
-#require(QxUtil)
-#require(QxConst)
************************************************************************ */
@@ -439,65 +436,6 @@
};
-/* ********************************************************************
- Element from point for gecko
-
- Program: document.elementFromPoint(int clientX, int clientY)
- in Gecko
- Author: Jason Karl Davis (www.jasonkarldavis.com)
- Date: 15 June 2003
- Purpose: Emulate Internet Explorer's document.elementFromPoint
- method as described here:
- http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/elementfrompoint.asp
- Requirements: A browser built off of the 1.4 branch of Mozilla
- (or better)
- Distribution: You may freely distribute and use this script as long
- as these comments remain intact
- Modified by: Sebastian Werner for usage in qooxdoo
- 10 February 2005
-******************************************************************** */
-
-// Must be Mozilla 1.4 branch or higher
-if (QxClient.isGecko())
-{
- Document.prototype.elementFromPoint = function(x, y)
- {
- this.addEventListener(QxConst.EVENT_TYPE_MOUSEMOVE, this.elementFromPointHandler, false);
-
- var event = this.createEvent("MouseEvents");
- var box = this.getBoxObjectFor(this.documentElement);
-
- event.initMouseEvent(QxConst.EVENT_TYPE_MOUSEMOVE, true, false, this.defaultView, 0, x + box.screenX, y + box.screenY, x, y, false, false, false, false, 0, null);
-
- this.dispatchEvent(event);
- this.removeEventListener(QxConst.EVENT_TYPE_MOUSEMOVE, this.elementFromPointHandler, false);
-
- return this.elementFromPointTarget;
- };
-
- Document.prototype.elementFromPointHandler = function(event)
- {
- // http://www.xulplanet.com/references/xpcomref/ifaces/nsIDOMNSEvent.html
- this.elementFromPointTarget = event.explicitOriginalTarget;
-
- // reparent target if it is a text node to emulate IE's behavior
- if (this.elementFromPointTarget.nodeType == Node.TEXT_NODE) {
- this.elementFromPointTarget = this.elementFromPointTarget.parentNode;
- };
-
- // change an HTML target to a BODY target to emulate IE's behavior
- // (if we are in an HTML document)
- if (this.elementFromPointTarget.nodeName.toUpperCase() == "HTML" && this.documentElement.nodeName.toUpperCase() == "HTML") {
- this.elementFromPointTarget = this.getElementsByTagName("BODY").item(0);
- };
-
- event.preventDefault();
- event.stopPropagation();
- };
-
- Document.prototype.elementFromPointTarget = null;
-};
-
/* ********************************************************************
Error Extender
|