Re: Connecting to a signal given as a string

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

Murray Cumming
murrayc murrayc com

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