how to pickle treectrl?

Bert Marco Schuldes wrote:

Hallo,

I am pretty new to python and wxwindows.

I tried in vain to pickle a wxtreectl with children and subchildren and data associated
to each node.

a simple dump(tree, file) does not do the trick.

is there any simple solution for this problem?

Pickle knows nothing about the C++ object that is wrapped by the Python wxTreeCtrl object so it is unable to get/set the data contents of the tree. You can help it by deriving your own wxTreeCtrl class and providing __setstate__, __getstate__ and etc. methods. See the pickle docs for more details.

ยทยทยท

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