hi,Sabir

Is this warning happen when i dynamically allocate WLabel or
> WContainerWidget or WTable.
>

According the Wt warning log code,  the original parent of the widget which
you wanted to add (to "this" ) should not be "this", that is, for example ,
you had a :

WContainerWidget *container_ = new WContainerWidget(this);
WTable *table_ = new WTable(container_);
.....
then, you wrote:

addWidget(table_) // it actually means "this->addWidget(table_)"

if that is ok, table will have two parents, container_ and this.

so Wt said : wApp->log("warn")  << "WContainerWidget::addWidget()
reparenting widget";

That is right?
Regards
zhimin

 ----------------------------------------------------------------------
void WContainerWidget::addWidget(WWidget *widget)
{
  if (widget->parent()) {
    if (widget->parent() != this) {
      wApp->log("warn")
    << "WContainerWidget::addWidget(): reparenting widget";
      widget->setParent(0);
    } else
      return;
  }
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to