Re: g_object_set_data()
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Sidcpc gmail com
- Cc: gtk-app-devel-list gnome org
- Subject: Re: g_object_set_data()
- Date: Wed, 12 Apr 2006 16:35:45 +0200
On Wed, Apr 12, 2006 at 03:29:50PM +0200, jls wrote:
I try to set a glist to a name
What does it mean "set a glist to a name"?
with the function
g_object_set_data as follow :
g_object_set_data(G_OBJECT(DirList),"dirlist",pWindow);
when I try to get this object with the g_object_get_data
function
And the code is?
GLib-GObject-WARNING **: invalid uninstantiatable type
`<unknown>' in cast to `GtkCList'
Gtk-CRITICAL **: file gtkclist.c: line
2673 (gtk_clist_append): assertion `GTK_IS_CLIST (clist)' failed
You cannot get these errors from g_object_get_data().
So what you really do?
Who can I deal with those functions ?
g_object_set_data(G_OBJECT(object), "key", pointer);
...
/* later */
pointer = g_object_get_data(G_OBJECT(object), "key");
Of course, object must still exist.
Yeti
--
That's enough.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]