Categories | Question details Back To List | ||||||||
DHTMLXTree: enableDragAndDrop() How come every time I click on the tree I get an "no such object or method" exception but just by removing this property tree.enableDragAndDrop(true, false); the problem disappears? What's going on behind? How to solve this issue? Answer posted by Support on Apr 07, 2008 10:18 After enableDragAndDrop command item react on mousedown action ( it track mouse gestures to start d-n-d operation ), but it is pretty safe code, which must not cause such error. If problem still occurs for you - please send any kind of sample where problem can be reconstructed ( you can send it directly to support@dhtmlx.com) Answer posted on Apr 07, 2008 10:32 Answer posted by Yves on Apr 08, 2008 02:02 Here is what happens; I declare a tree and temporary put the d&d property on hold; tree=new dhtmlXTreeObject('treeBox',"100%","100%",<%=jRootId%>); tree.enableDragAndDrop("temporary_disabled", false); tree.attachEvent("onXLE",loadInitialPage); In the loadInitialPage based on some exterior parameter I decide to make allow the tree to be dynamic; if (myCoreBusinessLogic) { tree.enableDragAndDrop(true, false); } So. Whenever I comment that line everything runs fine, but with no d&d of course; With that instruction on, the tree works until an item gets dragged. When the left button of the mouse gets clicked and the item starts to be dragged, the above mentioned exception arises and no drag and drop action whatsoever happens. I have no idea why it happens that way, but I suspect something might got wrong in the libraries. Any ideas? Answer posted by Support on Apr 08, 2008 02:24 Please check attached sample, it uses the same code and works fine. Attachments (1)
Answer posted by Yves on Apr 08, 2008 04:38 I found the problem... dhtmlxtree_dd.js scrumbled the drag&drop functionnality as it was included in the imported scripts; |