Re: invalid cast error with GnomeAppBar

Date view Thread view Subject view Author view

From: Clayton Van Kempema (clay@ezminer.com)
Date: Thu Apr 13 2000 - 21:41:33 EDT


Thank you Damon. I see the error of my ways - Clay

At 12:43 PM 4/13/00 +0100, you wrote:
>Clayton Van Kempema wrote:
>>
>> I've got a one-window gnome application as generated by Glade 0.5.7, using
>> the default gnome application bar. I'm trying to send a message to it.
>>
>> Here's the code I put in callbacks.c:
>>
>> GnomeAppBar *appbar1 = (GnomeAppBar*) gtk_object_get_data (GTK_OBJECT
>> (app1), "appbar");
>> gnome_appbar_set_status (appbar1, "Message");
>>
>> On execution it yields:
>>
>> Gtk-Warning: invalid cast from (NULL) pointer to 'GtkObject'
>
>How is app1 being set in your code? It looks like it isn't being set
>properly.
>
>You probably should be using:
>
> GnomeAppBar *appbar1 = (GnomeAppBar*) lookup_widget (widget, "appbar");
>
>where 'widget' is the first argument to the signal handler.
>
>
>Damon
>
>
>
>+---------------------------------------------------------------------+
>To unsubscribe from this list, send a message to majordomo@ncis.pn.org
>with the line "unsubscribe glade-devel" in the body of the message.
>

+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to majordomo@ncis.pn.org
with the line "unsubscribe glade-devel" in the body of the message.


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Aug 01 2000 - 19:28:21 EDT