Re: (gpointer) strcut ???????????????



Dear Vaf

> Castellano :
> 
> Hola  a  toda la lista !!
> Tengo un problema un tanto  complicado .
> Como hago para  pasarle  a un objeto creado  hasociarle  una  STRUCT
> con datos dentro  y luego poder
> ser   leidos por otra funcion ?????
> No logro hacerlo !!!
> gracias a todos !!!

Though I can only guess at the meaning of this litany, I do
know what "problema un tanto complicado" must mean.

I looked at your file and replaced

gint  datos( GtkWidget *widget,GdkEvent *event,gpointer *data )
{
   gtk_widget_set_uposition(widget,x,y);
   g_print ("el valord de VALOR es =%d \n",data->datos_toma->valor);
                                           ----------------
   return 0;
}

with

gint  datos( GtkWidget *widget,GdkEvent *event,gpointer *data )
{
   gtk_widget_set_uposition(widget,x,y);
   g_print ("el valord de VALOR es =%d \n",
            ((struct _datos_toma*)data)->valor);
            ---------------------------
return 0;
}

In other words, you weren't casting properly.

Greetings from Germany, Mark Roberts

Attachment: solution.tar.gz
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]