0
使用pygtk 2.24和glade 3我遇到組合框有問題。當我在它單擊一個項目,我得到了以下錯誤消息在組合框中選擇一個項目pygtk glade3
interface.py:94: Warning: unable to set property `text' of type `gchararray' from
value of type `glong'
gtk.main()
我的組合框代碼是在這裏
#get the combo box out of the builder and add items to it
self.cbmoRepresentation = builder.get_object("cmbo_representation")
self.iface_list_store = gtk.ListStore(gobject.TYPE_STRING)
self.iface_list_store.append(["Row-Column"])
self.iface_list_store.append(["Row-Number"])
self.iface_list_store.append(["Number-Column"])
self.cbmoRepresentation.set_model(self.iface_list_store)
cell = gtk.CellRendererText()
self.cbmoRepresentation.pack_start(cell, True)
self.cbmoRepresentation.add_attribute(cell, "text", 0)
self.cbmoRepresentation.set_active(-1)
任何幫助將非常感激:)。