On Sun, Jun 13, 2010 at 5:00 AM, Zhimin Song <[email protected]> wrote:
> code 2: // this is wrong, txt can not show
>
>  WContainerWidget *cw = new WContainerWidget(this);
>  Text *txt = new Text("aKey", cw);

Well considering that the only constructor you have that is not
commented out is this:
        Text(const std::string& key, bool option = false, WContainerWidget
*parent = 0);
Meaning that you are passing cw to option, which will be converted to
a boolean, and parent remains 0.  Perhaps you meant:
>  WContainerWidget *cw = new WContainerWidget(this);
>  Text *txt = new Text("aKey", false, cw);

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to