Re: [gtkmm] connecting to an checkbutton in a listview
- From: MHL Schulze t-online de (Martin Schulze)
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] connecting to an checkbutton in a listview
- Date: Thu, 17 Oct 2002 17:47:27 +0200
Am 2002.10.17 16:18 schrieb(en) Daniel Sundberg:
On 17 Oct 2002 14:53:27 +0200
Bart Hakvoort <bart hakvoort castel nl> wrote:
> Hi,
>
> I'll try to connect a callback to a signal_toggled() emmited by an
> checkbutton in a listview. But whatever i try, i still get the same
> compile error. Hopefully this two lines of code illusrtates the problem,
> if not, i'll can always add more.
>
> -----------------------------------------------------------
> Gtk::CellRendererToggle* pRenderer = Gtk::manage( new
> Gtk::CellRendererToggle() );
> pRenderer->signal_toggled().connect( SigC::slot(*this,
> &LijstDagdeel::listview_on_cell_toggled) );
> -----------------------------------------------------
>
Did you declare listview_on_cell_toggled as:
LijstDagdeel::listview_on_cell_toggled(Glib::ustring)
?
Otherwise you can write:
pRenderer->signal_toggled().connect( SigC::hide<const Glib::ustring&>(
SigC::slot(*this, &LijstDagdeel::listview_on_cell_toggled) ) );
You can only directly connect a slot to a signal if the template
parameters of the two classes Glib::SignalProxyX and SigC::SlotX
as returned by SigC::slot() are identical.
This is not the case if the return type, the number of parameters or
the parameter types of the function you pass into SigC::slot() differ
from the template parameters of the Glib::SignalProxyX object you try
to connect to.
For more detailed information please have a look at the documentation
of libsigc++.
Regards,
Martin Schulze
Daniel Sundberg
dss home se
> the compile error is :
>
> no matching function for call to 'Glib::SignalProxy1<void. const
> Glib::ustring &>::connect ( SigC::Slot0<void>)'
>
> any thoughs ?
>
> bart
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]