Re: gtk_label_set_text does't work ?



±èÁ¾Ãµ wrote:
> I got the error bellow.
> 
> Gtk-WARNING **: invalid cast from '(unknown)' to 'GtkLabel'
> Gtk-CRITICAL **: file gtllabel.c: line 260 (gtk_label_set_text):
>                           assertion 'GTK_IS_LABEL (label)' failed.
> 
> --- code ----
> 
>     GtkWidget *label;
>     label=gtk_label_new("TEST");
>     gtk_widget_show(label);
> -----------------------------------------------------
> During runtime,
>     gtk_label_set_text(GTK_LABEL(label), "RUNTIME");
> -----------------------------------------------------
> here, in runtime, gtk_label_set_text outputs ahead.
> why? what?
> How can I  do this?
> What is the problem?


Hiya, I think there must be a bug in your code. Post the whole thing,
and we'll see if we can find it for you.

John

(please don't post HTML to mailing lists)




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