Project

General

Profile

Actions

Bug #3245

closed

WApplication::docRoot returns empty string after WServer::post

Added by Alan Finley almost 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Benoit Daccache
Target version:
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

#3

Updated by Koen Deforche almost 10 years ago

  • Status changed from New to InProgress
  • Assignee set to Benoit Daccache
#4

Updated by Benoit Daccache almost 10 years ago

  • Status changed from InProgress to Resolved
#5

Updated by Koen Deforche over 9 years ago

  • Status changed from Resolved to Closed
#6

Updated by Koen Deforche over 9 years ago

  • Target version set to 3.3.5
Actions

Also available in: Atom PDF