Re: Trying to use Gtk::Main::signal_key_snooper



Bob Caryl wrote:


Hello Everyone:

I'm trying to use the above entitled method by connecting to it thusly:

Gtk::Main::signal_key_snooper().connect(sigc::mem_fun(*this,&Employee::on_F1_pressed));


where Employee::on_F1_pressed is prototyped thusly:

   int Employee::on_F1_pressed(GtkWidget *widget,  GdkEventKey *keyevent)

whereupon, I get the followings errors upon *linking* the application:

/opt/gnome/include/sigc++-2.0/sigc++/functors/slot.h:172: instantiated from `static T_return sigc::internal::slot_call2<T_functor, T_return, T_arg1, T_arg2>::call_it(sigc::internal::slot_rep*, typename sigc::type_trait<T_arg3>::take, typename sigc::type_trait<T_arg4>::take) [with T_functor = sigc::bound_mem_functor2<int, Employee, GtkWidget*, GdkEventKey*>, T_return = int, T_arg1 = Gtk::Widget*, T_arg2 = GdkEventKey*]'

/opt/gnome/include/sigc++-2.0/sigc++/functors/slot.h:180: instantiated from `static void*(* sigc::internal::slot_call2<T_functor, T_return, T_arg1, T_arg2>::address())(void*) [with T_functor = sigc::bound_mem_functor2<int, Employee, GtkWidget*, GdkEventKey*>, T_return = int, T_arg1 = Gtk::Widget*, T_arg2 = GdkEventKey*]'

/opt/gnome/include/sigc++-2.0/sigc++/functors/slot.h:607: instantiated from `sigc::slot2<T_return, T_arg1, T_arg2>::slot2(const T_functor&) [with T_functor = sigc::bound_mem_functor2<int, Employee, GtkWidget*, GdkEventKey*>, T_return = int, T_arg1 = Gtk::Widget*, T_arg2 = GdkEventKey*]'

/opt/gnome/include/sigc++-2.0/sigc++/functors/slot.h:1184: instantiated from `sigc::slot<T_return, T_arg1, T_arg2, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::slot(const T_functor&) [with T_functor = sigc::bound_mem_functor2<int, Employee, GtkWidget*, GdkEventKey*>, T_return = int, T_arg1 = Gtk::Widget*, T_arg2 = GdkEventKey*]'

employee.cpp:120:   instantiated from here

Any ideas what I've committed/omitted here?

Thanks,

Bob Caryl
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Nevermind everyone. I mis-interpreted the docs on the slot formal parameters. Got it right now.

Bob



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