gtk_widget_set
- From: hubert fauque wanadoo fr
- To: gtk-list redhat com
- Subject: gtk_widget_set
- Date: 15 May 1999 08:51:20 +0200
Hello,
I am learning GTK; in testgtk.c there are some
calls to gtk_widget_set like the following:
gtk_widget_set (tips_query,
"GtkWidget::visible", TRUE,
"GtkWidget::parent", box3,
"GtkTipsQuery::caller", button,
"GtkObject::signal::widget_entered", tips_query_widget_entered, toggle,
"GtkObject::signal::widget_selected", tips_query_widget_selected, NULL,
NULL);
I supposed that would be the same as:
gtk_tips_query_set_caller (GTK_TIPS_QUERY(tips_query), GTK_WIDGET(button));
gtk_widget_set_parent (GTK_WIDGET(tips_query), GTK_WIDGET(box3));
gtk_signal_connect (GTK_OBJECT(tips_query), "widget_entered",
GTK_SIGNAL_FUNC(tips_query_widget_entered), (gpointer)toggle);
gtk_signal_connect (GTK_OBJECT(tips_query), "widget_selected",
GTK_SIGNAL_FUNC(tips_query_widget_selected), NULL);
gtk_widget_show(GTK_WIDGET(tips_query));
but if I replace the gtk_widget_set call by this I get
the error (at execution):
Gtk-CRITICAL **: file gtktipsquery.c: line 324 (gtk_tips_query_start_query): assertion `GTK_WIDGET_REALIZED (tips_query)' failed.
could somebody explain the difference?
Thanks
Hubert
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]