Hi guys..
sorry for my bad english, i am from germany :)

my problem:

i want to build a small drag & drop interface. on the left is a list 
with some items:

    var links = new qx.ui.form.List;
    links.setDraggable(true);

now on the right is a list wher ei can drop these items
    var rechts = new qx.ui.form.List(true);
     rechts.setDroppable(true);

till there is no problem, my Listener are working, too
dragstart listener
    links.addListener("dragstart", function(e){
        e.addType("value");
        e.addAction("copy");
    })
droprequest listener:
    links.addListener("droprequest", function(e){
        this.debug("Related of droprequest: " + e.getRelatedTarget());
        var result = this.getValue();
        e.addData("value", result);
    })

drop listener:
    rechts.addListener("drop", function(e){
        this.debug("Related of drop: " + e.getRelatedTarget());
        var neuerListeneintrag = new 
qx.ui.form.ListItem(e.getData("value"));
        neuerListeneintrag.setValue(e.getData("value"));
        rechts.add(neuerListeneintrag);
    })

with these listeners i can add items from the "drag-list" to the 
"drop-list" and they are added to the end of the list and here is my 
problem:
i want to add the the item i dragged from my "drag-list" in the list, 
where i release it that i can add an item with drag and drop in the 
middle of the list or and the 2nd place.
my idea was to work with a "mouseout" listener so i can get the id from 
the element in my list, where i released my mousebutton.
so here my "new" drop listener:
    rechts.addListener("drop", function(e){
        this.debug("Related of drop: " + e.getRelatedTarget());
      
        rechts.addListener("mouseout", function(f){
            alert("this is a test");
        })
   
        /**
        * Do something
        */
    })

the problem here is, that i never become an alert with "this is a test". 
i never join the handler "mouseout". if i write the handler "mouseout" 
not in the "drop" listener it is working, but i dont want the "mouseout" 
listener to be activated, when i don't drag something.
i hope you guys unterstand my problem :)
 i dont know why it's not workin...
can someone help me please?

greetings michael weber



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to