On Thu, 21 Feb 2019 at 19:24, Радомир Хаџић
wrote:
> 2019-02-18 15:15 GMT+01:00, Daniel Boles via gtkmm-list <
> gtkmm-list@gnome.org>:
> >> The error I'm getting is that there is no such function.
> >
> > About which function? Anyway, please show all the code. As written, you
> > haven't proven
On Tue, 19 Feb 2019 at 08:42, Kjell Ahlstedt via gtkmm-list <
gtkmm-list@gnome.org> wrote:
> If you want to pass a widget to a signal handler, I suggest you pass a widget
> pointer.
>
>
I'm curious why? Other than, I guess, that being more familiar than
std::reference_wrapper, but I find the lat
If you want to pass a widget to a signal handler, I suggest you pass a widget
pointer. See e.g.
https://gitlab.gnome.org/GNOME/gtkmm-documentation/blob/gtkmm-3-24/examples/book/buildapp/step5/exampleapplication.cc
line 46.
In your case:
menu_item.signal_activate().connect(sigc::bind(sigc::ptr_f
I also suspect you'll need to pass that as std::ref(*this), otherwise I
think sigc++ will assume you want a copy, which is unlikely to end well.
___
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list
> The error I'm getting is that there is no such function.
About which function? Anyway, please show all the code. As written, you
haven't proven that the function *does* exist! And the code you posted
doesn't match any in the link you showed.
___
gtkmm-
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(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 be