wx.textctrl - GetSelections() treeID different from AppendItem treeID

Using 3 wxTreeCtrl objects, I have been trying to move selected tree entries
between the treectrl objects. It was hoped that keeping track of the
treeid's issued for each treectrl object when items were added would work.

However I am finding that the treeid returned from the GetSelections()
function is different from the treeid originally returned when AppendItem()
function was used within a given treectrl object.

Yet, if I only select 1 item, the treeId returned by GetSelections() and the
treeID generated during the AppendItem() returns the same label.

Does this seem correct?
Am I using the functions incorrectly?
What is the purpose of GetSelections() if it does not return treeID(s)
consistent with treeID(s) created when using AppendItem()?
Or perhaps there is another command other than AppendItem() that will
generate treeID(s) consistent with what is returned using the
GetSelections() function?

Please advise.
karl

Karl Kobata wrote:

Using 3 wxTreeCtrl objects, I have been trying to move selected tree entries
between the treectrl objects. It was hoped that keeping track of the
treeid's issued for each treectrl object when items were added would work.

However I am finding that the treeid returned from the GetSelections()
function is different from the treeid originally returned when AppendItem()
function was used within a given treectrl object.

Yet, if I only select 1 item, the treeId returned by GetSelections() and the
treeID generated during the AppendItem() returns the same label.

Does this seem correct?
Am I using the functions incorrectly?
What is the purpose of GetSelections() if it does not return treeID(s)
consistent with treeID(s) created when using AppendItem()?
Or perhaps there is another command other than AppendItem() that will
generate treeID(s) consistent with what is returned using the
GetSelections() function?

The wx.TreeItemId is basically a black box that acts as a handle to an item. But it is a temporary object and there can be multiple handles to any item, and I suppose depending on the implementation that there can be times when an existing handle is no longer valid even if the item still exists but has moved, etc.)

Can you create a small runnable sample that shows the problem you are having? It would probably help to explain what is going on.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!