Hello,
How can I transmit an array of widget (GtkWidget *widget[20]) to a
function using gtk_signal_connect_object
gtk_signal_connect_object(GTK_OBJECT(button),clicked,GTK_SIGNAL_FUNC(function),what
must I write here?);
Thanks in advance,
Anthony
--
http://www.freeciv.fr.st
Jean-Christophe Berthon wrote:
I'm not sure about it but try this :
gtk_signal_connect (GTK_OBJECT(button),clicked,GTK_SIGNAL_FUNC(function),
widget);
according that widget is the name of your array (GtkWidget *widget[20])
This should work, I think (thought I never tried it...)
No it
Hi,
On Thu, 5 Jul 2001, Anthony Ferrand wrote:
I'm not sure about it but try this :
gtk_signal_connect (GTK_OBJECT(button),clicked,GTK_SIGNAL_FUNC(function),
widget);
according that widget is the name of your array (GtkWidget *widget[20])
This should work, I think (thought I never
Raymond Wan wrote:
Hi,
On Thu, 5 Jul 2001, Anthony Ferrand wrote:
I'm not sure about it but try this :
gtk_signal_connect (GTK_OBJECT(button),clicked,GTK_SIGNAL_FUNC(function),
widget);
according that widget is the name of your array (GtkWidget *widget[20])
This should work,
In fact, it's not the point. The pb is that I can transmit widget[1]
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[20];
gtk_signal_connect
(GTK_OBJECT(button),clicked,GTK_SIGNAL_FUNC(function),(gpointer)carac);
--
Gemini -- Ernst Young
Toulouse FR
Skill Aerospace -- Image Quality
Email: [EMAIL PROTECTED]
Tel : (+33) 561 31 6639
- Original Message -
From: Anthony Ferrand [EMAIL PROTECTED]
To: GTK [EMAIL PROTECTED]
Sent: Thursday, July 05, 2001 12:03 PM
Subject: Transmit an array to a function
maybe if you just pass the address of the table like this:
gtk_signal_connect (GTK_OBJECT(button),clicked,GTK_SIGNAL_FUNC(function),
widget);
then in the callback function you should be able to access your table like
this :
(taking into account that the data pass to the function is of this form
Hey folks,
Since I've been getting so much from this list I thought I'd try and
give back. My observations on signal_connect have been:
1. It doesn't like large pointers. I've had trouble passing in (double
*) from time to time.
2. It is very sensitive to typecasting. Make sure you've got
David J. Topper [EMAIL PROTECTED] writes:
1. It doesn't like large pointers. I've had trouble passing in (double
*) from time to time.
It likes any pointer at all. ;-) void* is guaranteed to hold any
pointer. Something is wrong other than gtk_signal_connect().
Havoc