Hi all,
still on wt-3.3.1, I've just found a small issue.
When populating a groupbox and then using the
clear()
call, to make it empty, the groupbox title as well is
removed. A further setTitle() call to try to recreate
it results in a wt javascript error given back by the
browser.
Koen, Wim, can you confirm this? Or am I doing something
wrong?
A simple test case follows:
============= wtapp.h =================
#ifndef WTAPP_H_
#define WTAPP_H_
#include <Wt/WApplication>
#include <Wt/WGlobal>
class WtApp : public Wt::WApplication {
public:
WtApp( const Wt::WEnvironment& env);
~WtApp() {}
private: // methods
void eraseElements();
private: // members
Wt::WGroupBox* const theGroupBox;
};
#endif /* WTAPP_H_ */
=========================================
============= wtapp.cpp =================
#include "wtapp.h"
#include <Wt/WGroupBox>
#include <Wt/WPushButton>
#include <Wt/WText>
WtApp::WtApp(const Wt::WEnvironment& env)
: Wt::WApplication(env),
theGroupBox(new Wt::WGroupBox("Parameters", root())) {
theGroupBox->addWidget(new Wt::WText("New Text"));
Wt::WPushButton* const myButton = new Wt::WPushButton("Erase");
myButton->clicked().connect(this, &WtApp::eraseElements);
theGroupBox->addWidget(new Wt::WBreak);
theGroupBox->addWidget(myButton);
}
void WtApp::eraseElements() {
theGroupBox->clear();
// theGroupBox->setTitle("Parameters");
}
==========================================================
Thanks all,
Antonio
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest