gtk_text_inset -> 'text != NULL' error



The text widget is named 'txtInput' and it is already created and visible.
Also the text widget (txtInput) already contains text, I'm trying to use this
button (btnBold) to add more text and it gives me the following error.
(Note that I run my compiled program using the terminal to see signals and errors)
-------------------------------------------------------------------
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkText'
Gtk-CRITICAL **: file gtktext.c: line 953 (gtk_text_insert): assertion `text != NULL' failed.
-------------------------------------------------------------------

(Code Excerpt)

GtkWidget *txtInput;
void
on_btnBold_clicked (GtkButton *button, gpointer user_data)
{
gtk_text_insert (GTK_TEXT (txtInput), NULL, NULL, NULL, ("<B></B>"), -1);
}


           Yuushi





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