Help casting void pointer to GtkWidget

2015-07-19 Thread Patrick
Hi Everyone I am doing something strange. I am mixing C GTK and COBOL. It's GnuCOBOL and it compiles to intermediate C. I can create widgets by creating pointers in COBOL and passing them to C GTK functions and such but I can't seem to connect signals. This code: int sig_con1( GtkWidget *

Re: Help casting void pointer to GtkWidget

2015-07-19 Thread Jasper St. Pierre
Well, you're passing something that isn't a GtkWidget to sig_con1. The type of the pointer should not matter as long as it points to a GtkWidget (some secret sauce under the hood is used to know whether it's a valid pointer or not). We would need to see what calls sig_con1 to debug further, but lo

Re: Help casting void pointer to GtkWidget

2015-07-19 Thread Patrick
Hi Jasper You were right, the error was in the construction of the button. Thanks for your help, I am good to go now! -Patrick On 07/19/2015 04:09 PM, Jasper St. Pierre wrote: Well, you're passing something that isn't a GtkWidget to sig_con1. The type of the pointer should not matter as lo