Re: two or more objects into a signal handler

On Sat, Feb 10, 2001 at 07:36:46PM +0100 Gonzalo Aguilar wrote:

How can I pass two objects to a signal?

I'm trying to make a button unclickable if a entry text box is empty, so
I use the change event on the entry box to
check if the entry box is empty and if so, then I make the button

But then I need the entry box and the button in the signal handler, but
I only can pass one argument...
The entry box to check if it's empty, and the button to make it

How can I make this operation?

Should I use a structure to pass the pointers to the objects?

Thanks for your help...
Please answer to my e-mail too.

The entry_changed signal handler has two arguments:

on_entry_changed (GtkEditable     *entry,
                  gpointer         user_data);

First is the GtkEntry that has changed, second is the user data 
given by the signal_connect().
So you dont need to pass two arguments in this case.

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