Project

General

Profile

Wt 4 : Disconnection from DOM ?

Added by Hyeoni Hwasoo almost 7 years ago

(Sorry for the double posting from Issues)

Hi, I'm migrating an application from Wt 3.3.6 to 4.0.0 rc1 and I encountered a very very strange behaviour.

This simple code in the middle of my application (in Wt 4) :

Wt::WLineEdit * edit = new Wt::WLineEdit();
edit->blurred().connect([edit]()
{
  std::cout << "Value = " << edit->text()->toUTF8() << std::endl;
});

displays always the same value when I enter manualy (through the web interface) and I quit the focus.

But when I test that code within a simple test application it works.

If the value is set by setText the correct value is displayed.

This behaviour is the same with Checkbox and Combobox (I did not test other component but I think I will be identical).

It appears as if there is a disconnection from the DOM.

How that could be ?


Replies (3)

RE: Wt 4 : Disconnection from DOM ? - Added by Hyeoni Hwasoo almost 7 years ago

Just to be more precise, the value I enter from the web interface is totally ignored.

In some other place in my application, this piece of code works.

Unfortunalety I'm not yet able to isolate the environment with that behaviour.

I'm amazed because this code worked fined (yes, with std::bind) in Wt 3.

RE: Wt 4 : Disconnection from DOM ? - Added by Hyeoni Hwasoo almost 7 years ago

The problem seems to be corraleted with WStackedWidget.

    (1-3/3)