evil?! :) I don't like evil :) thanks 11.04.2013 19:32, [email protected] пишет: > Hi / ??????! 1. (C++-general) Virtual functions in public section are > evil. Especially when equivalent non-virtual function already exists. > It is better to introduce new virtual function in protected section > and call it from first function. 2. WApplication::root() returns 0 if > the application is deployed in WidgetSet mode. You can test if > WApplication::root() is not 0. > http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WApplication.html#a17e118a04d962459484a12989a80bc05 > 3. When you override non-virtual function, it is not applied to > instance accessed as pointer to base class (WApplication*). Downcast > WApplication* to instance of your application class using dynamic_cast > or static_cast. After it, you can use any methods defined in your > application class. On Thu, Apr 11, 2013 at 3:05 PM, ??????? > <[email protected]> wrote: >> > Hello. >> > The WidgetSet Mode are greate :) >> > >> > I try to use this and first I've thought was make a top widget (like in >> > the example) and ban a using of root. But it's impossible: the root is >> > not a virtual function. So >> > >> > Wt::WContainerWidget* root()const override {if(emb) throw root_using(); >> > else return Wt::WApplication::root();} >> > >> > does not override the root function. >> > >> > May be the root function is using in some place inside the library but >> > when a application is using in WedgetSet Mode it is a mistake (a using >> > of root), IMHO. >> > >> > -- >> > ???????
-- Алексей ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
