Re: Re: Calling function w/ multiple parameters




ajam <ajam@erols.com> writes:

> Thanks again for answering!  Okay, lets be even more specific.
> This below is my calling statement:
> 
> gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(f_group->f_window)->ok_button),                  
>                             "clicked", (GtkSignalFunc)open_proc, f_group);
> 
> , where:  "f_group" is a pointer to a struct which contains some pointers to
> Widgets and characters,  and "open_proc" is a function which is going to use
> some of the already defined structure elements, and it's going to produce an
> output before returning control.
> 
> The header of the called function looks like:
> 
> void open_proc (GtkWidget *widget, ff_struct *g_group) {...}
> 
> , where:  "ff_struct" is a typedef previously defined at the header of the file,
> and which was used to define "f_group".  (Both "f_group" and "g_group" are
> pointers to "ff_struct").  Here I'm simply defining "widget", so I have a second
> argument to receive my pointer.
> 
> I've been doing calls like this, but passing pointers to Widgets without any
> problems.  Here maybe I'm doing something really dumb related to pointers,
> but I don't see it.  Again any information will be more than appreciated.

The above code appears correct, and similar things certainly do work
with GTK. If you provide a complete (but small) example of code that
doesn't work, someone should be able to spot what is going wrong.

Regards,
                                        Owen



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