Hello zhimin,
So shall i search all occurecnce in the code where I have a line with
addWidget and check it from there .
Will this approach help me to to figure out problem completly.
On Thu, Jul 30, 2009 at 6:44 PM, Zhimin Song <[email protected]> wrote:
> 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
>
>
--
With Regards,
Sabir
+91 9895365676
Success is mostly in the attitude. “I always felt that my greatest asset was
not my physical ability, it was my mental ability.”
------------------------------------------------------------------------------
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