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: tadeb...@gmail.com > To: johnlu...@hotmail.com > CC: gtk-app-devel-list@gnome.org > Date: Sat, 5 Mar 2011 02:50:05 +0100 > > Hello. > > > 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: > > void > notify_callback (GObject *obj, > GParamSpec *pspec, > gpointer *data) > { > /* La la la */ > } > > Cheers, > Tadej > > -- > Tadej Borovšak > tadeboro.blogspot.com > tadeb...@gmail.com > tadej.borov...@gmail.com > _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list