Re: two or more objects into a signal handler



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
unclickable...

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
unclickable...

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.

Yes, but I WANT to pass two OBJECTS to my handler...

-- 
Gonzalo Aguilar. Madrid, España (Spain) |
Reymad Studios | gad reymad com         |
Privado        | eshero airtel net      |
----------------------------------------+




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