-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hello!
Take application lock (Wt::WApplication::UpdateLock) from handleRequest() if you change WApplication (by changing message resource bundle). Multiple requests may happend simultaneously for a single resource. To get WEnvironment from WApplication, use method environment(). See http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WApplication.html for full description of WApplication. To get translated strings, use WString::tr() method. It works even in handleRequest(). -----BEGIN PGP SIGNATURE----- Version: OpenPGP.js v0.6.1-dev Comment: http://openpgpjs.org wsBcBAEBCAAQBQJTqfZWCRDwHNxVpsK2zgAAeaQH/1GuHZcpoXbxby8qv7vz jocvdz9oUx9yKx1GO3zjyDzh8GXDe+q5iIChWSLTeFgFJ2UQyiB2zVxnarGA gVQtCuwuvLh8RVJPpoU8Jr9NEPusf4PEGafvQMw1HThpTMgY4pBD8vLa5Rve C7ED8xRCX5IVjE6zUYmH97Nk2W8dRglfyAzm9eRCfockD6cnvogb3B6wa5bE wkaROi426rlOmxZ0lwuWeN2iKmJuKSR9emAaKdYlSnPKkwpqmH1ce5s9z3Oq yLW11eWOGcn4tfP4VkN70Z/cz13PJIotVq0dFVomUcCo9OiO5+hwuSQzCBN/ 7f1yZywInfclQocAu7lXOjU= =OHOa -----END PGP SIGNATURE----- - Best regards, Boris Nagaev On Tue, Jun 24, 2014 at 7:01 AM, Jeffrey Scott Flesher Gmail <jeffrey.scott.fles...@gmail.com> wrote: > In the Example BlogRSSFeed, I want to use messageResourceBundle, > so in > BlogRSSFeed::handleRequest > > Wt::WApplication *app = Wt::WApplication::instance(); > app->messageResourceBundle().use("appPath", false); > > I get a runtime error. > > Any ideas on how I can get this to function correctly? > > Also I don't know how to get an instance of WEnvironment from any class not > derived from WApplication, do you? > If I did, I could write a class to return the tr strings. > > Thanks > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > witty-interest mailing list > witty-interest@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/witty-interest > ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest