Re: [gtk-list] Question about gtk-- signals..



jfp@squinky.org writes:
>           /********What is wrong with this line???*************/
>           connect(radiob->toggled,this, &RadioButtonBox::DoButtonBoxChange

radiob->toggled is a signal that takes no arguments and expects no return
type from the destination.

> RadioButtonBox::DoButtonBoxChange( Gtk_ToggleButton* toggle )
> {
>   if (toggle->get_state())
>     {
>       sigBoxChanged( buttonSpec[1].val);
>     }
> }                                                                                     
This one however takes one argument.

The sollution is either to remove the extra argument from the method, or
give  one extra argument for the connect() call.

So, either do this:
 connect(radiob->toggled,this, &RadioButtonBox::DoButtonBoxChange, mytogglebutton);

or
 
 RadioButtonBox::DoButtonBoxChange()

But not both. (C++'s typechecking catches quite many errors, but for all
of them, it gives kinda horrible error messages...)

-- 
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --



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