Re: Sending structures to callbacks



Hi,

Delbert Martin <dmartin kionix com> writes:

> I have Seen a lot of code on this but cannot get it to work on my program
> here is a example

your example can not work, try this one instead:

  struct entries {
 	GtkWidget *entry1;
 	GtkWidget *entry2;
  }
 
  struct entries str;

  str.entry1 = gtk_entry_new();
  str.entry2 = gtk_entry_new();
 
  gtk_signal_connect(GTK_OBJECT(object), "event",
                     GTK_SIGNAL_FUNC(my_callback), &str)

  ... [ the callback code was fine ]


Salut, Sven





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