[Glade-users] gobject.TYPE_PYOBJECT in a liststore

Hi, i am  converting a complex glade project to gtkbuilder. After a long 
fight with custom widget that are managed differently in gtkguilber i 
am  trying to use the treeview builder in glade.  In the original code i 
have that

        model = gtk.ListStore(gobject.TYPE_PYOBJECT, str, str)

i created a similar scheme in glade:
i selected Gobject in the list but it give me a NoneType so if i append 
a "None" it works but if a try to append to the model an object, string, 
string it give me a wrong type error

this is a print of the glade-made model:

print  type(model[0][0]), type(model[0][1]), type(model[0][2])

<type 'NoneType'> <type 'str'> <type 'str'>

model.append([None, "stringa1", "stringa2"]) <-- it works

model.append([mags[0], "stringa1", "stringa2"]) <-- doesn't work ( 
mags[0] is a db-record-obj )

any tips?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]