Re: sigc::ptr_fun() compiler error
- From: Murray Cumming <murrayc murrayc com>
- To: rchilds vctlabs com
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: sigc::ptr_fun() compiler error
- Date: Fri, 01 Jul 2005 17:46:11 +0200
On Thu, 2005-06-30 at 18:20 -0700, Ron Lockwood-Childs wrote:
> Hello,
>
> I get an error when trying to compile the following code:
>
> test.h
> ------
> #include <libglademm/xml.h>
> #include <gtkmm>
> #include <iostream>
>
> class Test
> {
> Glib::RefPtr<Gnome::Glade::Xml> refXml;
> Gtk::Window *pMWindow;
> void on_quit_activate() { if (pMWindow) pMWindow->hide(); }
[snip]
> pMenuItem->signal_activate().connect(
> sigc::ptr_fun( &Test::on_quit_activate ) );
ptr_fun() is for static or global functions. You need mem_fun() for
member functions.
--
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]