slots & callbacks



   I sent to this to the gtkmm list and the libsigc list, but no one has
been able to help. This post isn't really C++-centric. It has more to with
slots and callbacks.
   I created a ComboWCB class with
a member function called Callback. This class is derived from the
Combo class. I then write:

ComboWCB *NewCombo = manage(new ComboWCB);
...
NewCombo->get_popwin()->unmap_event.connect(
slot(NewCombo, &ComboWCB::Callback) );

The prototype for ComboWCB::Callback is as follows:
void Callback(GdkEventAny *Event);

   I get an error on the last line. The compiler complains that
there is no matching function: no matching function for call to
'::Gtk::::Gtk::EmitProxySignal1<int,_GdkEventAny
*,::Gtk::Widget,_GtkWidget,30,gtkmm_widget_unmap_event(GtkWidget *,
GdkEventAny *)>::connect (::SigC::::SigC::Slot1<void,_GdkEventAny *>)'
/usr/local/include/gtk--/proxy.h:208: candidates are:
::Gtk::::Gtk::ProxySignal1<int, _GdkEventAny
*,::Gtk::Widget,_GtkWidget,30>::connect<gint, GdkEventAny *, ::Gtk::Widget,
GtkWidget, 30>(const ::SigC::::SigC::Slot1(int,_GdkEventAny *> &)

Thanks for the help.
Arun





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