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

Reply via email to