Hey,
Animation will not work on an 'inline' widget. You need to make the
following change to your code:
text_->setInline(false);
And I also fixed a bug that prevented the same widget to be animated a
second time in this case.
Regards,
koen
2015-01-03 3:54 GMT+01:00 K. Frank <kfrank2...@gmail.com>:
> Hello List!
>
> animateShow appears to fail in a simple test application.
>
> I have been having trouble getting animateShow / animateHide
> to work properly, so I tried a simple test and it seems to fail, at
> least on chrome, firefox, and ie. (The simple test works on opera).
>
> 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.
>
> I see half a dozen WAnimation bugs (most resolved) on the issue
> tracker:
>
> http://redmine.webtoolkit.eu/projects/wt/issues
>
> but none are this plain-vanilla or obviously directly relevant.
>
> I am running Wt 3.3.3 built natively with 64-bit mingw-w64 on
> 64-bit windows 7. The browsers are
>
> chrome: Version 39.0.2171.71 m
> firefox: 32.0.2
> ie: Version: 11.0.9600.17420
> opera: Version 12.17 (test works on opera)
>
> Any advice on using animations correctly would be appreciated.
>
> 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.
>
> Thanks.
>
>
> K. Frank
>
>
> ==========
>
> #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
>
------------------------------------------------------------------------------
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