[Glade-users] lookup_widget oddness



Harring:

On Mon, 2003-01-27 at 20:25, Harring Figueiredo wrote:
--- Neil Hodge <neh attbi com> wrote:
All:

I have just started porting my app to gtk2 using glade2.  Using the
following code:

GtkWidget *tree;
tree = lookup_widget(mainwindow, "pctv");

I keep getting the following warning:

warning: assignment makes pointer from integer without a cast

Any ideas?  Thanks.


 You mainwindow is probably a GtkWindow* or something else other than a
GtkWidget*. Try casting it to a GtkWidget*

   tree = lookup_widget( GTK_WIDGET(mainwindow), "pctv");



It definitely is a GtkWindow *, but when I cast it using GTK_WIDGET, the
result is identical.  I have some inkling that the error has something
to do with the return type.  I just tried this:

tree = (GtkWidget *)lookup_widget(GTK_WIDGET(mainwindow), "pctv");

everything works no problem.  But this should not really be necessary.

Anyone, any ideas what's going on here?

Thanks.

Neil






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