=?Windows-1252?Q?RE:_GtkSwi?= =?Windows-1252?Q?tch_=97_lack?= =?Windows-1252?Q?_of_specif?= =?Windows-1252?Q?ic_signal?=

Ahhhh!     Thank you Tadej.    No,   mine had only two parameters,  the obj ptr and the data ptr.I added the 
paramspec in between and now all works perfectly.
By the way  -  this seems a bit unpleasant,  that some callbacks have a prototype of (objptr, dataptr) and 
others have (objptr,  paramspec, dataptr).How would I know which one to use?     Is it that some are in the 
gtk layer (2 params) but other like notify::active are in the gdk layer (3 params)?And I kind of feel 
something should have alerted me although I don't know what  -  I guess the compiler doesn't know.
I suppose this is all described somewhere  -  where?    (I am new to gtk application programming).
Cheers,   John

Subject: RE: GtkSwitch — lack of specific signal
From: tadeboro gmail com
To: johnlumby hotmail com
CC: gtk-app-devel-list gnome org
Date: Sat, 5 Mar 2011 02:50:05 +0100


Thanks both.     I tried notify::active and it works as well as event-after but still the data pointer 
argument is bad on entry to the callback(it's not zero but not a valid  GTK_WIDGET either).     I don't 
know why  - maybe something related to GtkSwitch or maybe a mistake in my code somewhere.
Cheers,   John Lumby

Are you sure your functions has the right prototype? GObject::notify
signal handlers should have callbacks defined like this:

notify_callback (GObject    *obj,
                 GParamSpec *pspec,
                 gpointer   *data)
  /* La la la */


Tadej Borovšak
tadeboro gmail com
tadej borovsak gmail com


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