On Sat, Apr 03, 2004 at 11:00:40AM +0200, Nemesis wrote: > Hi all, > I'm writing a newsreader with python+pygtk. I'm using a TreeView > in order to show the articles (in a threaded fashion). I'd like to > store the model so I don't have to rebuild the threads every time I > select the group. > I've tried pickling the TreeModel, but it isn't picklable. How can > I store this information?
Options I can think of: 1. Traverse the tree (TreeModel.foreach and TreeModel.get_value) and save each node. You can use the path as a key, and it's then easy to rebuild the TreeModel. 2. Save nodes in the tree as they are added. It may help to subclass TreeStore. 3. Write you own TreeModel that can be persisted at once. Dave Cook _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
