hi, El mié, 02-07-2008 a las 22:54 +0300, Paul Pogonyshev escribió: > Felipe Reyes wrote: > > [...] The other way that I found (the one that I want to implent) is > > proposed by Davyd Madeley[0], but it doesn't work, I attached a small > > test case. > > It fails because you initialize gtk.ListStore as if with one column: > > super(PhotoListStore, self).__init__(Photo) > > You probably shoud > > super(PhotoListStore, self).__init__(Photo, str, int) > > instead. if I do this I will have to pass the uri and size on the append method, so it falls to duplication data again :(
> > > how do you handle the ListStore to avoid data replication?, somebody has > > some tip to do with pygtk the same that davyd does with gobject? > > That non-OOP approach of GTK+ tree models always bugged me as > promoting bad coding style: duplicating data between your real back > end and GTK+ GUI tree model with no means of automatic synchronization. > I actually have some old code lying around, maybe I will try to clean > it up and publish somewhere... yes, I feel the same :-\, my last option will be implement a complete GenericTreeModel, but I feel that will be too much effort for something that pretty trivial. > > In short, I think this is not easy. Maybe there are ready-made > solutions out there, e.g. in Kiwi, dunno. > I'm gonna look for those libs if there is somethin ready to use. thanks paul for the answer ;) -- Felipe Reyes Astorga counter.li.org #316380
signature.asc
Description: Esta parte del mensaje está firmada digitalmente
_______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/