Well myTab and mySon are both children of myMain.

I am not sure if this should fail but I will say it is convoluted.

Does this still occur if you do not parent mySon initially?

Wt::WContainerWidget* myMain(new Wt::WContainerWidget(myApp.root()));
Wt::WContainerWidget* mySon(new Wt::WContainerWidget());
Wt::WTabWidget* myTab(new Wt::WTabWidget(myMain));
myTab->addTab(mySon, "");

--Thomas
PS: I bow to you for using proper initialization, I still have a bad habit of using =.

On 08/04/2011 09:25 AM, Francesco Basile wrote:
Hi all,
I've encountered a failing assert running this code

#include <Wt/Test/WTestEnvironment>
#include <Wt/WApplication>
#include <Wt/WContainerWidget>
#include <Wt/WTabWidget>

int main() {
  const Wt::Test::WTestEnvironment myEnv;
  Wt::WApplication myApp(myEnv);

  Wt::WContainerWidget* myMain(new Wt::WContainerWidget(myApp.root()));
  Wt::WContainerWidget* mySon(new Wt::WContainerWidget(myMain));
  Wt::WTabWidget* myTab(new Wt::WTabWidget(myMain));
  myTab->addTab(mySon, "");
}

Is there something wrong in this code?
Thank you in advance,
Francesco
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to