Re: Callback Parameters are Switched
- From: Tomas Carnecky <tom dbservice com>
- To: dhk <dhkuhl optonline net>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: Callback Parameters are Switched
- Date: Mon, 21 Jul 2008 16:37:34 +0200
dhk wrote:
Tomas Carnecky wrote:
dhk wrote:
I'm using glade for a front end which has a button that when clicked
passes a notebook as the user_data to the callback.
I'm using the gdb debugger to look at the two parameters in the
callback and they are switched. The first parameter, the button, is
the notebook object and the second parameter, the user_data, is the
button object. If I don't use user_data in Glade the parameter are
correct, the first is the button and the second is NULL.
Why is this happening?
http://library.gnome.org/devel/gobject/stable/gobject-Signals.html#g-signal-connect-swapped
Ok, I think that explains it, but how was I suppose to know that was
happening? . . . and what is the purpose in swapping the parameters?
Why do that?
There are circumstances where swapping the params is useful. But I have
no idea why glade does it automatically for you.
tom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]