Hi Koen! Thanks for following up.
Please let me emphasize that my issue not urgent, and not really important in any way. I'm just playing around with Wt trying to learn what it does and how to use it. So I appreciate your advice, but I'm not making any specific requests. On Mon, Jan 5, 2015 at 3:46 AM, Koen Deforche <k...@emweb.be> wrote: > Hey, > > Animation will not work on an 'inline' widget. You need to make the > following change to your code: > text_->setInline(false); Please let me clarify to be sure I understand: 1) To use animation, I need a non-inline widget, e.g. setInline(false); But 2) Even with setInline(false);, my use case -- hiding and showing the same widget repeatedly -- is not expected to work correctly because of the bug you mention below. Is this correct? > And I also fixed a bug that prevented the same widget to be animated a > second time in this case. Again, just to confirm, does this bug mean that my test program is not expected to work (even with setInline(false);)? Is the bug fix simple? Is it something I can hand-patch in my build of Wt 3.3.3? I did add setInline(false); to my test program, specifically: AnimateTest::AnimateTest (const WEnvironment& env) : WApplication(env) { showButton_ = new WPushButton ("Show", root()); hideButton_ = new WPushButton ("Hide", root()); new WBreak (root()); text_ = new WText ("show / hide text", root()); text_->setInline (false); // <-- only change to test program showButton_->clicked().connect (this, &AnimateTest::show); hideButton_->clicked().connect (this, &AnimateTest::hide); } void AnimateTest::hide() { text_->hide(); } void AnimateTest::show() { text_->animateShow (WAnimation (WAnimation::SlideInFromRight)); } I still see the same behavior -- the text does not reappear after the second attempt to show it. (I only checked ie and chrome, and both show the same behavior.) > Regards, > koen Thanks again. K. Frank > 2015-01-03 3:54 GMT+01:00 K. Frank <kfrank29.c@gmail.>> >> Hello List! >> >> animateShow appears to fail in a simple test application. >> ... >> Please take a look at the test program (below) and let me know >> if I am doing something wrong or if this is a known issue. >> >> One button is connected to WText::hide() and another to >> WText::animateShow(). The first time animateShow is called, it >> works, but subsequent calls fail. >> ... >> The test program appears below. The symptom: Click the Hide >> button, "show / hide text" is hidden, click Show, the text is shown, >> click Hide and Show again, and the text stays hidden. >> ... >> ========== >> >> #include <Wt/WAnimation> >> #include <Wt/WApplication> >> #include <Wt/WBreak> >> #include <Wt/WPushButton> >> #include <Wt/WText> >> >> using namespace Wt; >> >> class AnimateTest : public WApplication { >> public: >> AnimateTest (const WEnvironment& env); >> private: >> WPushButton *showButton_; >> WPushButton *hideButton_; >> WText *text_; >> void show(); >> void hide(); >> }; >> >> AnimateTest::AnimateTest (const WEnvironment& env) : WApplication(env) { >> showButton_ = new WPushButton ("Show", root()); >> hideButton_ = new WPushButton ("Hide", root()); >> new WBreak (root()); >> text_ = new WText ("show / hide text", root()); >> showButton_->clicked().connect (this, &AnimateTest::show); >> hideButton_->clicked().connect (this, &AnimateTest::hide); >> } >> >> void AnimateTest::hide() { text_->hide(); } >> void AnimateTest::show() { text_->animateShow (WAnimation >> (WAnimation::SlideInFromRight)); } >> >> WApplication *createApplication(const WEnvironment& env) { >> return new AnimateTest (env); >> } >> >> int main (int argc, char **argv) { >> return WRun (argc, argv, &createApplication); >> } >> >> ========== ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest