On Sun, Jan 09, 2000 at 07:18:44PM +1100, Bill Shui wrote:
> void hello(GtkWidget *widget, GdkEvent *event, gpointer data)
> {
> ...
> }
> void crap(GtkWidget *widget, GdkEvent *event, gpointer data)
> {
> ...
> }
>
> I get something like these printed out in my terminal:
> �ct@\ was pressed <--- it should print "crap button was pressed"
>
> pct was pressed. <-- it should print "hello button was pressed"
>
>
The problem here is your callbacks, they should be defined as:
void hello(GtkWidget *widget, gpointer data)
{
...
}
No GdkEvent pointer is passed to a "clicked" callback so with your code you
will get the char pointer in the event parameter and just junk in the data
parameter.
--
Fredrik Hallenberg [EMAIL PROTECTED]
http://www.lysator.liu.se/~hallon [EMAIL PROTECTED]
--
To unsubscribe: mail -s unsubscribe [EMAIL PROTECTED] < /dev/null