Re: Probleme with SigC::Signal0



On Thu, 10 Sep 2009 21:47:41 +0300 "sledge" wrote:
> 
> I think in C++ you just do this:
> void PlotTest::Curve_changed();

No, the original syntax was right there.
 
> Also maybe you should connect it this way(not sure)
> myCurve1->signal_curve_changed().connect( sigc::mem_fun(this,&PlotTest::Curve_changed) );

Again, no, sigc::mem_fun takes a reference not a pointer, so "this" needs to have a star.

> Date: Thu, 10 Sep 2009 14:59:13 +0200
> Subject: Probleme with SigC::Signal0
> From: florent blanchon gmail com
> To: gtkmm-list gnome org
> 
<snip>
>  
> With Curve_changed as : void PlotTest::Curve_changed(void)
>  
> the compiler make me this error : Invalid use of void

That doesn't seem like a sensible error message for a problem with the use in sigc::mem_fun. We need to know where this error is reported. Have you checked there isn't some silly typo in the line before? Perhaps a missing close-brace or semicolon?


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