From: Masao M. <mu...@hi...> - 2004-03-25 11:45:36
|
Hi, On Wed, 24 Mar 2004 16:33:32 -0800 (PST) Joao Pedrosa <joa...@ya...> wrote: > > But on each loop I want to create a new TreeView > > with > > a new model (TreeStore), and everything related to > > the > > old TreeView would be freed up automatically as > > every > > reference to it would me removed and would leave it > > to > > be garbage collected. Hmm. You may be right, though I need times to consider about it. > So now I think that deserves some documentation. > Because in the OO world with Garbage Collection we > aren't used to freeing up the resources. It would help > enormously to know what resources should be freed > manually. > > While writing the PyGTK version I missed something > like the Ruby-GNOME2 documentation. :-) They follow > the GTK API more closely, but I prefer the > enhancements that we have. For example: > > -- PyGTK -- > iter = self.model.append(None) > self.model.set_value(iter, index, 'value') > > -- Ruby-GTK+2 -- > iter = @model.append(nil) > iter.set_value(index, 'value') -- Ruby/GTK2 -- iter = @model.append(nil) iter[index] = 'value' -- .:% Masao Mutoh<mu...@hi...> |