Project

General

Profile

Actions

Support #2195

open

Popup MessageBox fails in NavigationBar Widget

Added by Bud T over 11 years ago. Updated almost 11 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
Actions #1

Updated by Bud T over 11 years ago

Any thoughts on this error? Again, I'm just using the code directly out of the NavigationBar example in Widget Gallery.

Actions #2

Updated by Koen Deforche over 11 years ago

  • Status changed from New to InProgress
Actions #3

Updated by Koen Deforche over 11 years ago

  • Assignee set to Wim Dumon
Actions #4

Updated by Wim Dumon over 11 years ago

Hello Bard,

Can you make me a complete file (ideally a modified hello.c) that demonstrates the problem? That would save me quite some time!

Thanks in advance,

Wim.

Actions #5

Updated by Bud T over 11 years ago

Wim:

This particular issue is related to the section from lines 74 to 87.

When run with that block commented out there is no error; however, click on "Help" link only displays the menu once. Second click makes it disappear and third click does nothing.

Brad

Actions #6

Updated by Wim Dumon about 11 years ago

Hello brad,

The code you posted compiles fine on my computer, is this still a compilation problem? I use a patched boost 1.54 (for asio), and MSVS 2012 EE

BR,

Wim.

Actions #7

Updated by Jeff Flesher almost 11 years ago

If you are using Qt Creator add this to the Project file:

QMAKE_CXXFLAGS += "-std=c++11"

CXXFLAGS="-std=c++0x"

Actions

Also available in: Atom PDF