[pygtk] Combo Box problem..

Peter Morgan pm at daffodil.uk.com
Sun Jun 11 01:51:57 WST 2006


Am a bit of a newbie.. but getting an unexpected error... when 
set_active() called and it doesnt select one of the dropdowns

GtkWarning: gtk_entry_set_text: assertion `text != NULL' failed
 combo.set_active(1)




       ##colTypes
       selectMe = 'int(11)'
       self.colTypesStore = gtk.ListStore(str)
       self.colTypesStore.append( ['varchar(20)'])
       self.colTypesStore.append( ['int(11)'])
       self.colTypesStore.append( ['timestamp'])      
 combo = self.wTree.get_widget('editColTypes'); # combo = gtkComboBox 
from Glade
       combo.clear()
       combo.set_model(self.colTypesStore)
       print len(self.colTypesStore)
       cell = gtk.CellRendererText()
       combo.pack_start(cell, True)
       combo.add_attribute(cell, 'text', 0)
       combo.set_active(1)
       #combo.set_active_iter(1,)
       #combo.set_value_in_list(selectMe, True)
       #combo.set_active_iter(1)

Can anyone shed some light on what I'm doing wrong

Pedro


More information about the pygtk mailing list