i have a very interesting problem.
background
i've used TTreeView for years but only now am using it with a docking library (from AutomatedQA). i've learned that when the parent of the TTreeView is changed, all the handles are recreated. this is something the docking library does during normal activites.
i've been using the Data property on the TTreeNode to hold an object. i've also kept a linkage to the TreeNode in the object. in short, using the TreeNode, i can get the object and i can also get the TreeNode from the object.
as long as the tree view never has it's parent changed (auto-hide & show window), my application works perfectly.
the problem
what i find is that once the parent has changed, my object attached to the tree node's Data property now contains references to the wrong tree node or a stale pointer.
i tried it another way "MyTreeViewContainer.Parent:=SomewhereElse" and observed the same problem.
reloading the tree with possibly hundreds of objects wouldn't be very efficient.
i don't see how i should work around this problem. i have for so long been able to load the tree view and have the objects remain able to find each other easily. this could really break my nice "pattern" for using the tree view...
thank you for your help!