[Glade-users] Fwd: gtk_combo_box_append_text() problem



Hello,

I had this same problem. It seems that comboboxes made with glade are
not created with gtk_combo_box_new_text().

It could be a great feature if we could choose, in some glade
property, if the combobox will be a simple text one.

In the mean time, I can send you the code do populate the combo
(passing a vector of strings) and retrieve the active item (the
string, not the index), if you wish.

Best regards!
Carlos

On Mon, Oct 20, 2008 at 11:12 AM, Arigead <captain.deadly at gmail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quick question about the combo box. In Glade (3.4.5) I've created my
interface file and in it there's a GtkComboBox. I'm trying to add to
that ComboBox's list with the function gtk_combo_box_append_text().


Basically in my C code I get the comboBox with gtk_builder_get_object()
and then call gtk_combo_box_append_text() this gives me an error:

(gmpg:12154): Gtk-CRITICAL **: gtk_combo_box_append_text: assertion
`GTK_IS_LIST_STORE (combo_box->priv->model)' failed

I've searched for this error message and can't see anything very useful.
I've looked at the spec for the function call and there's no warnings
except:

Note that you can only use this function with combo boxes constructed
with gtk_combo_box_new_text().

I've no idea if glade uses gtk_combo_box_new_text() to construct the widget.

Yes I am a newbie and wish I didn't have to ask this question.

Apologies
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI/JG1XlbjSJ5n4BARAunxAKDAVsi0xNx4MNQcFF8sprI1dRAIlQCfflgF
Y/ptcpwFEn3u6YpD++7NnuM=
=YnXy
-----END PGP SIGNATURE-----
_______________________________________________
Glade-users maillist  -  Glade-users at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-users




--
=============================================
Carlos Jos? de Almeida Pereira
Ilh?us - Bahia - Brasil

BLOG:
     http://starfightercarlao.blogspot.com
     http://starfightercarlaoenglish.blogspot.com (english version)


"Felicidade se acha ? em horinhas de descuido."

"Qualquer amor j? ? um pouquinho de sa?de, um descanso na loucura."

                                                 (Guimar?es Rosa, ambas)



-- 
=============================================
Carlos Jos? de Almeida Pereira
Ilh?us - Bahia - Brasil

BLOG:
      http://starfightercarlao.blogspot.com
      http://starfightercarlaoenglish.blogspot.com (english version)


"Felicidade se acha ? em horinhas de descuido."

"Qualquer amor j? ? um pouquinho de sa?de, um descanso na loucura."

                                                  (Guimar?es Rosa, ambas)




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