Actions
Bug #3245
closedWApplication::docRoot returns empty string after WServer::post
Start date:
06/02/2014
Due date:
% Done:
0%
Estimated time:
Description
A short example:
void postSig()
{
Wt::WApplication::UpdateLock lock(wApp);
if (lock)
{
qDebug() << "postSig" << "docroot:" << wApp->docRoot().c_str();
}
else
{
qDebug() << "something terrible";
}
}
void sendSig()
{
qDebug() << "sendSig" << "docroot:" << wApp->docRoot().c_str();
Wt::WServer::instance()->post(wApp->sessionId(), boost::bind(&postSig));
}
Wt::WApplication* createApplication(const Wt::WEnvironment& env)
{
Wt::WApplication *app = new Wt::WApplication(env);
app->enableUpdates(true);
qDebug() << "create" << "docroot:" << app->docRoot().c_str();
Wt::WPushButton *b = new Wt::WPushButton("send sig", app->root());
b->clicked().connect(boost::bind(&sendSig));
return app;
}
WApplication::docRoot
returns empty string in the postSig
function. In other functions it returns correct value.
I use Wt 3.3.1
Updated by Koen Deforche almost 10 years ago
- Status changed from New to InProgress
- Assignee set to Benoit Daccache
Actions