No, the actual problem is that I'm still getting None out of
TreeModel. Take a look at this function:

        def reflect_view(self):

                print self
                list.__delslice__(self, 0, len(self))
                print self

                for row in self.view.get_model():
                        list.append(self, row[0])
                print self

Notice the three instances of 'print self'. I have confirmed that my
_view_rebuild methon, which syncs the view with the model (when the
model is modified by my code), is not being run anywhere inside of
this function, only before it. The first time an item is added to the
list, here is the output from the three calls to print:

['Some List Item']
[]
[None]

Therefore, row[0] in that for iteration is None instead of 'Some List
Item'. Which is weird.

I experimented by appending the entire row to the list: These are the
outputs I got: 

    First Addition:
['List Item Blah']
[]
[<gtk.TreeModelRow object at blahblah>]

    Second Addition:
[<gtk.TreeModelRow object at blahblah>, 'Some Other Item']
[]
[]

These two patterns of outputs alternate when you add more items.

Any ideas?

-- 
David McCabe
PGP Key ID: 0xBD6B3B4E
41E5DD0466B3C3EFFAC6977DD5B80608BD6B3B4E

Attachment: signature.asc
Description: Digital signature

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to