Re: How to get stuff out of a GValue?
- From: Dan H <dunno stoptrick com>
- To: gtk-app-devel-list gnome org
- Subject: Re: How to get stuff out of a GValue?
- Date: Mon, 19 Nov 2007 13:18:36 +0100
On Mon, 19 Nov 2007 11:33:36 +0000
Emmanuele Bassi <ebassi gmail com> wrote:
Hallo Emmanuele,
it's not getting better. Here's my code. li->data points to a cild of the table, and the code compiles
without warnings with -W -Wall:
-------------------------
g_value_init(&value, G_TYPE_INT);
gtk_container_child_get(GTK_CONTAINER(table), li->data,
"left-attach", &value, NULL);
g_printerr("%s\n", g_strdup_value_contents(&value));
g_value_unset(&value);
-------------------------
and on running it, I still get this error:
GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE
(value)' failed
Strangely, when I comment-out the call to gtk_container_child_get(), g_strdup_value_contents(&value) just
returns "0" (as expected). It seems to be gtk_container_child_get() that somehow messes up the value.
--D.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]