it seams that your data is a dictionary object, the simple updating of the dictionary is enough, no need to call SetPyData because the tree control holds the reference to the dictionary, not its contents. Maybe you're placing the same object in more than on node.
Anyway... the first version should have worked, try creating a small app that demonstrates this problem.
Also consider providing the platform you're on and the version of wxpython you're using.
···
On Tue, 10 Aug 2004 15:16:26 +0200, kevin Thackray <kevin.thackray@clarisys.fr> wrote:
hi everyone,
I have playing with treectrl in wxWidgets 2.5 and it append to have a
wired behevior when binding python datas to nodes :
when subclassing wxTreeCtrl :def updateData(self, key, value):
params = self.GetPyData(self.getSelectedNode())
params[key] = value
self.SetPyData(self.getSelectedNode(), params)
--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/