wxTreeItemData not good work

Krzysztof Local wrote:

Hello Im having problem, my class inherit in wxTreeItemData.

[...]

and my problem: Function dir(self.GetItemData(itm)) not list
MyTreeItemData, MyTreeItemData not assign, dir(...) list only default
class wxTreeItemData why?

For a number of reasons that I won't go into here. In a nutshell, wxPython is not able to track original objects for wxTreeItemData and will alway create new shadow/proxy objects when a wxTreeItemData is returned from a method.

But the above is not ever needed since you can assign any python object directly as the item data and the wrappers will automatically put it in or get it out of a wxTreeItemData as needed. Just use
  
  tree.SetPyData(item, data)
and
  data = tree.GetPyData(item)

ยทยทยท

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