Re: [gnet] Using GNet callbacks with C++ (solved)



On Tue, Jul 22, 2003 at 11:18:13PM -0700, Charles Kerr wrote:

> On Wed, Jul 23, 2003 at 01:03:20PM +0800, Michael Alger wrote:

>> Is there any (clean) way of using GNet in a C++ application, where the
>> callback functions are wanting to be member functions of a class? I've
>> searched around for a C++ wrapper or any mention at all of how to do
>> this, but to no avail.

> The same way one uses other GObject signals with C++ (and, in my case,
> the way I use Motif :P with C++ in my day job) -- use private static
> class methods to act as one-liner wrapper functions to the non-static
> functions.

Thanks for that, Charles -- it works perfectly.  I had a feeling it'd
be something really simple and obvious once it was pointed out.
-- 
Mike.



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