I'm learning qx 1.1 by combining the drag-drop list demo with the tree
demo so that I will have a drag-drop tree demo. I want to be able to
construct one tree (as is in the tree demo) and then drag items from
that tree to another tree (as in the list demo). 


Everything seems to work fine until the drop point, where I get an
error: 


Error:
This method must not be used outside the drop event listener!

Source File:
file:///home/bill/Soft/hack/Python/qooxdoo-1.0.1-sdk/framework/source/class/qx/event/handler/DragDrop.js

Line: 204



The problem is the the getData
method. Yet I don't see how that error message applies in my case,
because the only place I use getData is in an event listener. Here is
my listener for the target tree: 


tree2.addListener("drop",
function(e) {

       
alert(e.getRelatedTarget());

       
var items = e.getData("qx/tree-items"); //this is a problem???

       
for (var i=0, l=items.length; i<l; i++) {

           
this.add(items[i]);

       
};

});



I have no idea why I am getting an error here, though I suspect I am
using misusing "this" or there is an event bubble effect that I have
not been able to follow. 


Any pointers on how to solve this? The full code is attached (
http://n2.nabble.com/file/n5020171/Application.js Application.js ).

Thanks!

-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/getData-error-blind-newb-question-tp5020171p5020171.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to