RE: [wxPython] Finding wxTreeItemId from data associated to a wxT reeItemData
Well, I used your suggestion and it works great.
I used the following:
self.treeDict[id(accounts[i])] = twig
and then do a:
twig = self.treeDict[id(dlg.parentAccount)]
when I need to find it. I'm assuming that python will not change the id of
an object while it is in memory.
> -----Original Message-----
> From: Robin Dunn [SMTP:[hidden email]]
> Sent: Thursday, February 17, 2000 2:38 PM
> To: Cavanaugh, Craig; [hidden email] > Subject: Re: [wxPython] Finding wxTreeItemId from data associated to
> a wxTreeItemData
> > I need to update
> > the tree when the list changes, but I do not know what the treeItemId is
> > I do not want to store the treeItemId with the real data.
> This is what I would suggest. Or perhaps using an intermediate dictionary
> something to map your data objects to tree IDs.
> Robin Dunn
> Software Craftsman
> [hidden email] > http://AllDunn.com/robin/ > http://AllDunn.com/wxPython/ Check it out!