Hello John,
That is indeed C++11. MSVS 2010's support for C++11 is probably
insufficient to do anything serious with it. You will need MSVS2012, and
still take into account that C++11 support is limited.
We did the new widget gallery in C++11 style because the result is quite
nice. Your work-around looks correct, but Wt's old-style connectors are
shorter to type:
image->mouseMoved().connect(this, &MyClass::OnMouseMoved);
You can still use boost::bind for the more complex cases (where you
actually want to partially bind function parameters).
BR,
Wim.
2013/6/6 Jon Haitz Legarreta <jhlegarr...@vicomtech.org>
> Hi there,
> first post. I am just starting with Wt.
>
> I was trying the Images layout found at
> http://www.webtoolkit.eu/widgets/layout/imagesWt's example gallery.
>
> When trying to compile the second example the following signal/slot
> connection
>
> image->mouseMoved().connect(std::bind([=] (const Wt::WMouseEvent& e) {
> out->setText("You're pointing the background at "
> "(" + boost::lexical_cast<std::string>(e.widget().x) +
> "," + boost::lexical_cast<std::string>(e.widget().y) +
> ").");
> }, std::placeholders::_1));
>
> results in series of compiler errors starting with
> error C2903: 'result' : symbol is neither a class template nor a function
> template
>
> which, as far as I've been able to know, are related to the C++
> implementation (C++11 I think). I am using MS VS2010.
>
> I spent some time looking for a workaround. Despite not fully
> understanding why this happens, the only simple solution (compiling and
> working) I found is the following:
>
> image->mouseMoved().connect(
> boost::bind( &MyClass::OnMouseMoved, this, _1 ) );
>
> void MyClass::OnMouseMoved( const Wt::WMouseEvent& e )
> {
> m_Out->setText("You're pointing the background at "
> "(" + boost::lexical_cast<std::string>(e.widget().x) +
> "," + boost::lexical_cast<std::string>(e.widget().y) +
> ").");
>
> }
>
>
> Don't know whether others have experienced this before, but hope it helps.
>
> Kind regards,
> JON HAITZ
>
>
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest