Project

General

Profile

Support #2195

Popup MessageBox fails in NavigationBar Widget

Added by Bud T over 8 years ago. Updated over 8 years ago.

Status:
InProgress
Priority:
Normal
Assignee:
Target version:
-
Start date:
09/09/2013
Due date:
% Done:

0%

Estimated time:

Description

I'm testing the navigation bar code taken directly out of: http://www.webtoolkit.eu/widgets/navigation/navigation-bar

Everything works except for this code block in the class (which inherits from WApplication):

    popup->itemSelected().connect(std::bind([=] (Wt::WMenuItem *item) {
      Wt::WMessageBox *messageBox = new Wt::WMessageBox
        ("Help",
         Wt::WString::fromUTF8("<p>Showing Help: {1}</p>").arg(item->text()),
         Wt::Information, Wt::Ok);

        messageBox->buttonClicked().connect(std::bind([=] () {
        delete messageBox;
        }));

        messageBox->show();
    }, std::placeholders::_1));

When the application is run with this block included --- even when it is run without the interior parts, i.e.:

    popup->itemSelected().connect(std::bind([=] (Wt::WMenuItem *item) {
    }, std::placeholders::_1));

The build fails with such errors as these:

Error   1   error C2903: 'result' : symbol is neither a class template nor a function template  c:\program files (x86)\microsoft visual studio 10.0\vc\include\xxresult 28
...
Error   2   error C2039: 'result' : is not a member of '`anonymous-namespace'::<lambda0>'   c:\program files (x86)\microsoft visual studio 10.0\vc\include\xxresult 28

All of which reference line 28 of xxresult:

typedef typename _Fty::template result<_Fty(_ARG0_ARG1)>::type _Type;

I have no idea how to troubleshoot these errors.


Files

Wt_ticket_2195.txt (4.44 KB) Wt_ticket_2195.txt Bud T, 09/21/2013 11:08 AM

Also available in: Atom PDF