Re: [Cppcms-users] rendering list of widgets::checkbox
Brought to you by:
artyom-beilis
From: augustin <aug...@ov...> - 2011-03-10 09:30:21
|
I thought maybe my approach was too complicated, so I tried another approach which I thought would be simpler, but in vain. Instead of using a std::list, I don't declare any checkbox widgets in the form struct, i.e. I don't declare them in the header file. Instead, I try to introduce new form elements in the .cpp file by declaring a new widget in my content's form element, like this: cppcms::widgets::checkbox c.form.check = cppcms::widgets::checkbox(); where c.form is the base form, but I get the compile error: error: expected initializer before ‘.’ token Attached is a patch against examples/forms/hello.cpp that shows what I'm trying to do. Bonus: the first hunk in the patch is for a typo fix. Thanks. Augustin. -- Friends: http://www.reuniting.info/ My projects: http://astralcity.org/ http://3enjeux.overshoot.tv/ http://linux.overshoot.tv/ http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ http://openteacher.info/ http://minguo.info/ http://www.wechange.org/ http://searching911.info/ . |