Support #2195
openPopup MessageBox fails in NavigationBar Widget
0%
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
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.
Updated by Koen Deforche over 11 years ago
- Status changed from New to InProgress
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.
Updated by Bud T over 11 years ago
- File Wt_ticket_2195.txt Wt_ticket_2195.txt added
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
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.
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"