Re: g_object_set_data
- From: Guillaume Charhon <pub charhon wanadoo fr>
- To: "David NeÄas (Yeti)" <yeti physics muni cz>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: g_object_set_data
- Date: Thu, 23 Nov 2006 20:45:00 +0100
But it's the same button :'( !
David NeÄas (Yeti) a Ãcrit :
On Thu, Nov 23, 2006 at 08:18:42PM +0100, Guillaume Charhon wrote:
When I do
guint i,j;
int test;
i = 4;
j = 6;
g_object_set_data(G_OBJECT(game->pButton[i][j]), "position_x",
GUINT_TO_POINTER(i));
test = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(game->pButton[i][j]),
"position_x"));
It works !
But you should decide whether the value is signed or
unsgined anyway to avoid surprises.
But when I use in an other function who was called from a button event
x = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(pButton), "position_x"));
There is a "0" in x!!!!!!!!
Check your code. game->pbutton[i][j] and pbutton are two
different objects.
Yeti
--
Whatever.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
---------------------------------------------------------------------------------------
Orange vous informe que cet e-mail a ete controle par l'anti-virus mail.
Aucun virus connu a ce jour par nos services n'a ete detecte.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]