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

Re: GtkComboBoxEntry Vs GtkComboBox



El mar, 22-01-2008 a las 21:55 +1100, Peter E Dennis escribió:
> 
> So I wondered if I needed to cast my GtkComboBoxEntry to a GtkComboBox
> but wasn't sure how to do this so I tried:
> 
> gtk_combo_box_append_text(GTK_COMBO(cboVocSource), "Hello World");
> 
> This however makes matters worse as I get the above warning still when
> I compile it, but now when I run it I get:
> $ ./box
> 
> (box:11338): GLib-GObject-WARNING **: invalid cast from
> `GtkComboBoxEntry' to `GtkCombo'
> 
> Can someone please tell me what I'm doing wrong?

You need to cast to a GtkComboBox, not to a GtkCombo. Use the
GTK_COMBO_BOX macro.

Claudio

-- 
Claudio Saavedra <csaavedra alumnos utalca cl>



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