Re: Problem with sigc::bind



On Fri, 2005-11-18 at 17:02 +0100, Armin Burgmeier wrote:
> Normally, you tell sigc::bind via the first template argument which 
> argument to bind to and not what type. I do not know whether there is 
> some magic to decide whether to interpret this argument as type or 
> argument number, but you may also try this:
> 
> m_TreeView.signal_row_activated().connect(
> 	sigc::bind(
> 		sigc::mem_fun(*this, &ComInfo::on_company_activated),
> 		sigc::ref(window)
> 	)
> );

I also advise against using sigc::ref(), because it makes the
lifetime-management more complicated. A pointer would be simpler.

-- 
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]