Re: g_object_set_data()
- From: jls <jls free fr>
- To: gtk-app-devel-list gnome org
- Subject: Re: g_object_set_data()
- Date: Wed, 12 Apr 2006 16:53:57 +0200
David Necas (Yeti) (2006-04-12, 16:35):
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"?
You're right, it's not clear
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?
You will find it as attached archive.
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.
My problem remains the same.
I try to feed a GClist Widget (DirList in the code), in the
OpenDskFile function. It avoid a global declaration, I try to use
g_object_set_data() function. The interface is like, it did not link
the DirList widget to the main widget pWindow (in my code).
To prevent to bored you, to you know a good tutorial to learn the
interface production ?
Sincerely
Jerome
Yeti
--
That's enough.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]