struct (multiple variables) gtk_signal_connect
- From: Anders Engberg <anders engberg2 telia com>
- To: gtk-app-devel-list gnome org
- Subject: struct (multiple variables) gtk_signal_connect
- Date: 06 Mar 2002 21:32:59 +0100
Hello
My problem seems to be somewhat of a FAQ, but none of the solutions that
i have seen so far on the web has gotten me around my problem. I have
seen one solution that solves this w/o a struct, but as my program
grows, i would like to have the multiple-variable-passing solved with
struct.
I have a badly designed database and need to send two variables to
identify a record. The calling function and the "reciving" function is
in two different files, they both call my siteupdate.h file, and the
definition of the struct is located in the calling function, i have
tried putting the definition in the .h file but had the same results.
The error message i recive is..
mysql.c:211:dereferencing pointer to incomplete type.
I hope someone can help me, even though this probably is more about me
knowing to little about c than me knowing to little about gtk.
thanks, Anders Engberg
sigfuncs.c
----
extern void button_catch_last()
{
typedef struct _Datapoint Datapoint;
struct _Datapoint{
gchar month[SMALL];
gchar day[SMALL];
};
Datapoint last;
----
snip
----
gtk_signal_connect(GTK_OBJECT (delbutton), "clicked",
GTK_SIGNAL_FUNC(removedata_last), &last);
mysql.c
----
void removedata_last(GtkWidget *button, gpointer *data){
struct Datapoint *last = (struct Datapoint *)data;
g_print("%s\n", last->month);
fail("Not done");
}
Btw, thanks also for the mailinglist, using the search function in
evolution on this list is a superb reference library.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]