[pygtk] gtkCombo box problem

Peter Morgan pm at daffodil.uk.com
Mon Jun 12 22:19:41 WST 2006


Am a bit of a newbie.. but getting an unexpected error...
when comboBox. set_active() is called and it doesn't 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)


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

Pedro


More information about the pygtk mailing list