Hey Koen,

Thank you very much for clarifications!
God bless you!

Regards,
Dmitriy

2010/4/30 Koen Deforche <[email protected]>

> Hey Dmitriy,
>
> 2010/4/29 Dmitriy Igrishin <[email protected]>:
> > Yes, the inheritance is likely to be preferable. But from what class?
> > Personally, I think that WContainerWidget in most cases is only an
> > implementation detail.
> > Therefore, the use of public inheritance to create a new widget if that
> > widget "is not" actually container is mistakable from the point of
> design.
> > So, I thought about public inheritance from WWidget and private
> inheritance
> > from WContainerWidget. But now I found a method WCompositeWidget::
> > setImplementation(..), which allows to set that WContainerWidget
> > is exactly an implementation detail of the composite widget.
>
> I think that sums up the raison-d'etre of WCompositeWidget !
>
> The multiple inheritance option doesn't work since Wt does not use
> 'virtual inheritance' to make the resulting diamond structure work as
> expected (and diamond structures are not very popular with C++
> veterans possibly because of the lousy support for it in the early
> compiler days but also because they make your head explode (certain on
> Friday evening)).
>
> I would recommend to use WCompositeWidget for preventing any
> implementation-leakage -- but you only need this for widgets that you
> really expect to be heavily reused throughout your project, company,
> etc...
>
> Regards,
> koen
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to