After running into issues with the opttree component from the incubator, I've extended the standard tree component to support drag and drop to allow reordering of the tree. I used the draglib library with checkdragstate and basedragimage for the implementation. It works great in all versions of swf. But with dhtml there is a subtle bug -- and of course dhtml is technology in which we need to deliver the code. With dhtml, if tree items are moved to a different branch of the tree, subsequent operations can be flakey. The correct item will be dragged, but occasionally the wrong target will be selected for the drop. After some investigation it looks as if the tracker implementing the drop does not refresh its view of the tree layout. When it tries to drop onto the Nth clone, it selects the original Nth clone rather than the current. However the displayed tree looks correct and I've manually walked both the hierarchy of clones and nodes and they both look correct. Only the tracker seems confused.

I tried fixing this by unregistering all drop targets and then re-registering them after moving a tree item. But the tracker still has the same, original view of the tree. Any suggestions on what I missed or how I might get the tracker synched up with the current layout of the tree?

Thanks!
Charlie Watt
Racemi

Reply via email to