I am making a application in qooxdoo to create a tree. Then I move some nodes
with events:
Button.addEventListener("execute",function()
{TREE.getSelectedElement().moveSelfAfter(TREE.getSelectedElement());});
When I am in the end of the widgets list, I get this error debug:
009092 ERROR: qx.ui.form.Button[150]: Could not dispatch event of type
"execute": TypeError - vChildren[i] has no properties
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/renderer/layout/VerticalBoxLayoutImpl.js:560
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/ui/core/Parent.js:463
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/ui/core/Parent.js:525
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/ui/core/Widget.js:3590
at
http://localhost:80/GW_tool/frontend/GW_qx/source/class/gwind/GwindContacts.js:97
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/core/Target.js:221
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/core/Target.js:183
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/core/Target.js:137
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/ui/core/Widget.js:5305
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/ui/form/Button.js:121
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/core/Target.js:221
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/core/Target.js:183
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/event/handler/EventHandler.js:752
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/event/handler/EventHandler.js:633
at
http://localhost:80/GW_tool/qooxdoo/framework/source/class/qx/event/handler/EventHandler.js:40
To correct this I chance the implementation of addAfter in class
qx.ui.core.Parent:
/*!
Add a widget after another already inserted child
*/
qx.Proto.addAfter = function(vChild, vAfter)
{
var vChildren = this.getChildren();
var vTargetIndex = vChildren.indexOf(vAfter);
if (vTargetIndex == -1) {
throw new Error("Child to add after: " + vAfter + " is not inside this
parent.");
}
var vSourceIndex = vChildren.indexOf(vChild);
if (vSourceIndex != -1 && vSourceIndex < vTargetIndex) {
vTargetIndex--;
}
return this.addAt(vChild, Math.min(vChildren.length-1, vTargetIndex+1));
/* return this.addAt(vChild, Math.min(vChildren.length, vTargetIndex+1));
OLD CODE*/
}
--
+------------------ http://www.cc.com.pl/ --------------- +
CCCC CCCC CC Otwarte Systemy Komputerowe Sp. z o.o. --------- |
CCC CCC - Clearswift, CheckPoint, Sun, Vasco Partner |
CC CC - Internet, Intranet, WWW, Bezpieczne sieci |
CCC CCC - TEL,FAX (+48) 22 646-68-73, 606-37-80 - |
CCCC CCCC - Rakowiecka 36, Warszawa, 02-532 PL -- |
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel