Hi Harri,

Sorry to hear you are having issues with the animation framework.

Are you able to provide a small, runnable example demonstrating the issues 
you've described below? That would be very helpful for tracking down their 
cause.

In the case of the ScriptAction happening out of sequence, does the "nextPage" 
state have a PropertyChanges setting the new page? In general any property 
changes that are not explicitly touched by an animation will happen 
immediately, before the transition starts. It might be that this is being 
triggered in your case? (if you add console.log() output to setPageTitle(), is 
that being received in sequence?)

Regards,
Michael

On 14/02/2012, at 7:16 AM, ext Harri Pasanen wrote:

> Lately I've been thinking that perhaps I should write a series of example
> applications on how not to do animations, as anything
> more complex I've tried seems to end up in dismal failure.
> 
> In the hope that I and others can use my latest failure as a learning
> experience, I lay it out in public here.
> 
> I'm attempting to make a "page" (the grid object below)
> to go out left, get rewritten, and come in again from the right:
> 
> grid.x = 0 in the beginning.
> 
> Transition {
>        to: "nextPage";
>        SequentialAnimation {
>              NumberAnimation { target: grid; properties: "x"; to: -500;
>                                                 duration: 3000; 
> easing.type: Easing.InOutQuad }
>              PropertyAction { target: grid; property: "x"; value: 500 }
>              ScriptAction { script: { setPageTitle()} }
>              NumberAnimation { target: grid; properties: "x"; to: 0;
>                                               duration: 3000; 
> easing.type: Easing.InOutQuad }
>              PropertyAction { target: grid; property: "state"; value: "" }
>        }
> 
> 
> Now the steps in SequentialAnimation certainly don't seem to be
> sequential despite its name.   Or rather the Sequential only applies to 
> animation
> parts, not the rest.
> 
> setPageTitle() gets called before the page has started to move, so
> it is the new page that I see going out.
> 
> Nothing ever comes back in, as if the second NumberAnimation would not run.
> 
> How should I achieve this?  It is certainly not intuitive to me.
> 
> I would expect animations to have isDone() signal or similar, where I 
> could trigger
> the next state to go to.  Then I could chain the together if I want.
> 
> If I have states A,B and C that an object to take consecutively, 
> procedurally,
> from code, how to do that?  Each state change has an attached animation 
> that
> should run to end prior to next state happening.
> 
> Thanks,
> 
> Harri
> 
> PS. is there qt-project.org mailing list for this list?
> 
> 
> 
> 
> 
> _______________________________________________
> Qt-qml mailing list
> Qt-qml@qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml

_______________________________________________
Qt-qml mailing list
Qt-qml@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to