Re: [gtkmm] compilation error due to a signal connect
- From: Roger Leigh <roger whinlatter uklinux net>
- To: cedric <cedric probesys com>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] compilation error due to a signal connect
- Date: Tue, 13 Apr 2004 15:44:58 +0100
cedric <cedric probesys com> writes:
> hi!
> i m a newbie on gtkmm and i have a little (BIG ;-/ ) problem:
>
> i ve made a class "test". in the constructor, i create a
> Gtk::Menu::MenuElem MenuName, and i want to connect it with a function
> "print". it works only and only if this "print" function is declared
> as static, because if i declare it virtual (or even without virtual)
> and not static, i have a compilation error :
> SigC::slot(&test::print) ); //here is the problem!
A pointer to a class member function requires a reference to the class
as well as the method:
SigC::slot(*this, &test::print) );
--
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]