[pygtk] ListStore question

euoar euoar at yahoo.es
Thu Oct 26 06:56:53 WST 2006


mc collilieux escribió:
> euoar wrote:
>
>>> I'm learning the use of liststores and treeviews. I have wrotten
>>> this litle class as exercice:
>
>
>>> # name is the name of the new column to add, values is a tuple with
>>>  the values to add def add_result (self, name, values): self.iter =
>>> self.liststore.append(values[0]) for value in values: 
>>> self.liststore.insert_after(self.iter,  value)
>
>
> rereading the tutorial, I note "...The row parameter specifies the data
> that should be inserted in the row after it is created ... If row is
> specified it must be a tuple or list containing as many items as the
> number of columns in the ListStore...so
>
> self.liststore.insert_after(self.iter, [value])
>
> Hope it's the good answer...
>
> PS : sorry for the answer directly to your mail. too quickly clic
>
That's exactly the solution. It has to be a tuple. Thank you very much 
for your help!

		
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com


More information about the pygtk mailing list