So does it only deleti ITS children? Or does it destroy the childrens children and so on (the whole tree structure until the last leaf). Do I have to - pContainer->clear() or - "delete pContainer" or - both?
Cheers, Markus Hi markus, Yes, the destruction of Container0 will destroy all children in it Cheers! Dushan [email protected] wrote: > Hello, > > I am using witty and I have got a simple question. > I am using WContainerWidget class. Some of my objects contain more > WContainerWidget objects in it. So there is a tree-like arrangement of > WWidget 's and WObject 's. Some of the content of the container widget > is stored via pointers in my class, some are created localy in methods > (added to container via addWidget() method). So I am not able to > 're-get' these localy created pointers/objects since i am out of scope. > My question: Do I have to arrange the destroying of all the content, or > does it the WContainerWidget::clear() function (~WContainerWidget() > doesnt?)? > Does this function parses all "sub" container widgets and its childs and > delete them - or do I have to store all pointers and delete them on > timeout manually? > > An arrangement could be: > Container 0 > WTable 0.1 > WLineEdit 0.1 > SubContainer 1 > SubContainer 1.1 > WTable 1.1 > SubContainer 1.2 > WPushButton 1.2.1 > WPushButton 1.2.2 > WPushButton > SubContainer 2 > SubContainer 2.1 > WTable 2.1 > WTable 2.2 > SubContainer 3 > SubContainer 4 > ... and so on > > would Container0.clear() delete all subcontainers including their > subcontainers (...) and childs ect...? > If not, how do I have to solve it? > > Best regards from Germany > > Markus > > > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > witty-interest mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/witty-interest > > ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
