On Fri, Jun 04, 2004 at 06:20:04PM +0100, Jonathon McKitrick wrote: > if I have a set of objects and show their properties in a TreeView, is it > better to change the original objects then rebuild the ListStore, or extract the > changes from the ListStore and modify the original objects?
Best to avoid redundancy altogether if you can by directly using your objects. You can put the actual objects in the ListStore and then set the cell contents using a callback as described in the FAQ. http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq13.029.htp This is the easiest way to do it, but you lose interactive searches (which must be on a text column in the TreeModel.) Or you can write a custom TreeModel that returns values from your objects. This is more work since you have to write all the model methods and are responsible for sending out the right signals when the model changes. 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/