Re: gtk 1.1.14 - callback for button clicked changed?
- From: Rasca Gmelch <thron gmx de>
- To: gtk-devel-list redhat com
- Subject: Re: gtk 1.1.14 - callback for button clicked changed?
- Date: Sat, 30 Jan 1999 23:30:14 +0100 (CET)
hi owen,
> > for version 1.1.13 i had a button-clicked-callback like the following:
> > /*
> > * callback if button was pressed (signal: "clicked")
> > */
> > void
> > button_clicked (GtkWidget *button, obj *prog, GdkEventButton *event)
>
> You're lucky (or unlucky) that this didn't segfault with
> 1.1.13. Try:
>
> (GtkWidget *widget, GdkEventButton *event, obj *prog).
i think you are wrong, first the theory:
- in the 'prog' structure it is also passed a file name of an application
which will be started on button-click. until now it works fine.
if there would be an argument before the 'prog' argument a segmention
fault would be very likely (strings are more dangerous than just an
integer, isn't it?)
and then the praxis:
- i've changed my code as you said, but now i get a segmention fault
while accessing the strings in the 'prog' structure.. so i think
the gpointer from the gtk_signal_connect() is as i had it first the
SECOND argument in the callback!
- my question still lives: is there a third argument or not? is that
the event?
the function is connected via:
gtk_signal_connect (GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(button_clicked), (void *) prog);
cu
rasca
--
/#- Internet eMail: thron@gmx.de, FidoNet: 2:2410/304.5@fido -#\
<-#- Internet WWWeb: http://home.pages.de/~rasca/ -------------#->
\#- please do NOT quote these lines or other useless stuff! --#/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]