Re: Connecting to a signal given as a string
- From: Murray Cumming <murrayc murrayc com>
- To: Milosz Derezynski <internalerror gmail com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Connecting to a signal given as a string
- Date: Sun, 26 Oct 2008 10:50:51 +0100
On Sun, 2008-10-26 at 00:13 +0200, Milosz Derezynski wrote:
> You can not do it with a nonstatic member function because the this
> pointer is always implied with a static mem. fun. (which you most
> likely know, just repeating it for all); there's no way to directly
> connect C GSignals in a C++ object to a nonstatic member function.
You should do it the same way that gtkmm does it:
Your static callback function should call the C++ method on the C++
instance that was passed in the user_data parameter.
Of course, it's far easier just to use a gtkmm-style wrapper, such as
webkitmm:
http://blogs.gnome.org/jjongsma/2008/06/27/webkitmm/
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]