Unable to pass additional argument to signal handling function



I'm trying to call a function that accepts one parameter when user
clicks a menu item. I tried this:

menu_item.signal_activate().connect(sigc::bind<Gtk::Window>(sigc::ptr_fun(&handler_fun),
*this))

The method I put this code into is of class that inherits from
Gtk::Window. The handler_fun function does not belong to any class. I
saw this in official tutorial
(https://developer.gnome.org/gtkmm-tutorial/stable/sec-binding-extra-arguments.html.en)
but it doesn't work for me (the code won't compile). The error I'm
getting is that there is no such function.


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