Hi, I would like to re-open this thread and add the results of my investigations. Even if it is a quite old theme, it helped me most with drag&drop on tree. I am attaching the original file from Christian with changes that solves most of the problems I have found in this thread. In my case, I wanted to enable D&D only for items under the same parent folders, but it is easy to change it, if somebody needs.
However, during testing I found probably buggy behavior of methods addBefore and addAfter inside AbstractTreeItem.js. addAfter() - works correctly only when adding after the last children, but when adding after e.g. 2nd child from 5, the item is added after 3rd item addBefore() - doesn't work correctly at all, not possible to add before the last child and when adding before e.g. 3rd child from 5, the item is added before 4th item (expected behavior of addAfter() method) phill54 wrote: > > Christians Solution is the best I've seen so far ... Also I frequently get > uncaught exceptions like > > "037866 qx.event.Registration.getManager(null) was called!" or "target is > null" > Agree with Phil. I had also this problem, and couldn't find out how to prevent it or fix it (maybe only if(!target) return; :)). The error causes qx.event.Manager.dispatchEvent(target, event), because the "target" argument is somehow lost after the drag drop event model is completed. As I didn't find any reported bug on addBefore/addAfter methods for tree, I am not sure if it is considered as a bug. Anyway, it is possible to test the mentioned problems with the attached file. And I would really appreciate if there is some explanation or fix for the qx.event.Manager.dispatchEvent() method. Thanks and happy New Year, Luke http://old.nabble.com/file/p26928072/Application.js Application.js -- View this message in context: http://old.nabble.com/Drag-drop-on-Tree-tp22594754p26928072.html Sent from the qooxdoo-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
