Re: Using arguments in callbacks




Hi,

On Wed, 23 Mar 2005 11:59:39 -0500
Irwin Michael G DLVA <IrwinMG NSWC NAVY MIL> wrote:

Hello.  I am creating a GUI with Glade (V2.6.8).  I would like to have
several widgets call the same callback function, but with different
arguments passed to the function (e.g. the widget that called the
function).
It seems that the "Object" box under the "Signals" options is what I
would
need to use, but perhaps I am having trouble with the syntax of this
option.
Whatever I put in that box, it will give me an error when I build,
saying "I
don't know the type of [whatever I typed in there], so I can't connect
trajectoryTB's toggled"  (trajectoryTB is the widget name and the
signal is
toggled).  Can anyone help me out?
this Object must be a pointer that is available from the code where a
window is created, but you can also pass an int for
example
GINT_TO_POINTER(1)
and then get the int value using  GPOINTER_TO_INT

hs





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