Actually your right it is giving the level, grrrrrrrr.. i have not fully
tested since beta 3 but a trace shows that it does in fact not get you the
"specific" item.

I'm also interested in figuring this out. Please keep me up to date with
your progress, i'll do the same. :)

Jason




-----Message d'origine-----
De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] la
part de Jason Hawryluk
Envoyé : jeudi 11 mai 2006 13:22
À : flexcoders@yahoogroups.com
Objet : RE: [flexcoders] Flex2B3 - Drag And Drop - Drop Into Tree (different
from B2)


I've been having allot of problems as well with the tree and drag drop
operations. Specifically if the fact that the tree does not update properly
now, as it did before with relation to it's data source. Also I’m finding
that the drop indicator is all over the place. Are you experiencing the same
problems ?

Anyway to answer your question:

the below line should give you the node your over.

var currNodeOver:Object =
currTree.indexToItemRenderer(currTree.calculateDropIndex(event)).data;


then to get the drop parent would be something like

var myparent:object = getParentItem(currNodeOve);

Hope that helps.

Jason


-----Message d'origine-----
De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] la
part de Andrea Varga
Envoyé : jeudi 11 mai 2006 10:42
À : flexcoders@yahoogroups.com
Objet : [flexcoders] Flex2B3 - Drag And Drop - Drop Into Tree (different
from B2)


Hi All

I'm having difficulty with the drop part of the drag and drop in a Tree
in B3.

I  have my tree defined this way:
<mx:Tree id="myTree"
        dataProvider="{myTreeData}"
        dragEnter="doDragEnterTree(event);"
        dragDrop="doDragDropTree(event);"/>

And I have this method for dragDrop:

private function doDragDropTree(event:DragEvent):void {
    trace("DROP IN TREE index:" + myTree.calculateDropIndex(event));
}

This works well. My problem is: I want to know WHERE exacty the drop was
fired (where did the user released the mouse button) to know where the
insert my new item. The calculateDropIndex works well for List type
components, but for a Tree it is useless. It returns a level number.

In B2 the Tree had a method Tree.getDropParent(event), I suppose this
returned what I was looking for, but in B3 the Tree has no such a
method. In "Flex Beta 2 to Beta 3 Changes" it says:

Tree.getDropParent(event) - Use Tree.getParentItem(item:Object):*.

But I don't understand the logic here. getParentItem() has as parameter
item:Object, and I don't kno that, I know just an event, I want to find
out the item:Object.

What is the solution here?

Thanks for your help!

Andi


PS. My messages appear on the list with more than 8 hours delay !!!!  Why?







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com



SPONSORED LINKS Web site design development Computer software development
Software design and development
Macromedia flex Software development best practice



YAHOO! GROUPS LINKS

Visit your group "flexcoders" on the web.

To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com



SPONSORED LINKS Web site design development Computer software development
Software design and development
Macromedia flex Software development best practice



YAHOO! GROUPS LINKS

Visit your group "flexcoders" on the web.

To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to