Re RE: dereferencing



Hi,
The code fragment sent before was compiling fine under earlier versions i.e.
gtk+ 1.2.5. When I checked the gtknotebook.h file there is no struct type
decleration for _GTKNotebookPage. It is defined explicitly in gtknotebook.c
file hence in one of the object files of gtk. That is why in the help files
for GTK says "The GtkNotebookPage is an opaque implementation detail of
GtkNotebook." and I don't know how to solve this problem of dereferencing. I
think it is kind of versione problem but not sure.

Please some advice:


>You're probably passing in a bad pointer.

Hi,
Any idea how to solve this dereferencing problem? Thank you in advanced.

========= ERROR ========
GtkNotebookPagegtsrc.c: In function `set_notebook_tab':
gtsrc.c:144: error: dereferencing pointer to incomplete type

====CODE ========
/* This is an internally used function to set notebook tab widgets. */
void
set_notebook_tab    (GtkWidget       *notebook,  gint             page_num,
GtkWidget       *widget)
{
  GtkNotebookPage *page;
  GtkWidget *notebook_page;
  page = (GtkNotebookPage*) g_list_nth (GTK_NOTEBOOK (notebook)->children,
page_num)->data;
  notebook_page = page->child;  // LINE 144
  gtk_widget_ref (notebook_page);
  gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), page_num);
  gtk_notebook_insert_page (GTK_NOTEBOOK (notebook), notebook_page,
                            widget, page_num);
  gtk_widget_unref (notebook_page);
}



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