Re: Transmit an array to a function
- From: "Jean-Christophe Berthon" <jean-christophe berthon cgey com>
- To: "Anthony Ferrand" <Anthony-Ferrand wanadoo fr>, "GTK" <gtk-list gnome org>
- Subject: Re: Transmit an array to a function
- Date: Thu, 5 Jul 2001 13:51:27 +0200
maybe if you just pass the address of the "table" like this:
then in the callback function you should be able to access your table like
(taking into account that the data pass to the function is of this form :
try it maybe it work :-)
> Jean-Christophe Berthon wrote:
> > I'm not sure about it but try this :
> > gtk_signal_connect
> > widget);
> > according that widget is the name of your array (GtkWidget *widget)
> > This should work, I think (thought I never tried it...)
> No it doesn't work. During the compilation I get it:
> warning: passing arg 4 of `gtk_signal_connect_object' from incompatible
> pointer type
> But, anyway the prog works even with this compilation error.
> I can avoid this error by using "(gpointer)widget" instead of "widget"
> In fact, it's not the point. The pb is that I can transmit widget
> without any pb but I can't transmit the whole array in the same call.
> Idem if I want to transmit an array of char:
> char *caract;
> <-- won't work
> <-- will work
> (Of course, I change the receiving function to sync with the call)
> So, I am really lost... It must exist a solution to transmit an array of
> any type, no?
> gtk-list mailing list
> gtk-list gnome org
] [Thread Prev