I want to have a tree with a single level of folders, each with 0 or
more child nodes. The folders can be reordered, as can the children,
and while the children can be moved between folders, there is no
nesting (and children have to always be in a folder).
I've been having so many troubles with this it's not funny, but to
keep this post simple, is there a way to identify which parent a node
will be under, in the dragOver handler for a Tree component?
Most of the code I have seen is something like:
private function handleDragOver(event:DragEvent):void {
dropIndex = event.currentTarget.calculateDropIndex(event);
dropNode = event.currentTarget.indexToItemRenderer( dropIndex );
}
which will get the new index and the node currently in that index.
However, these are just to do with which node the cursor is over -
they both give the same reading when I drag a child to be at the end
of one folder list, or just outside that folder altogether.
Looking in the Tree.as source I guess that _dropData.parent is what I
am after, but this is a private property.
Any ideas?