Thank you all for the suggestions. They will be utilized... I still did want to iterate because I wanted to find the longest running animation and set that as the one to signal the completion. I created a property alias to be the longest running animation and in the script assigned the animation with the longest duration to the alias. But it didn't work (reference error IIRC). So I just made sure the longest-running animation is always used in the connection, and added the convention that its always a PauseAnimation of the same name at the top of the file.
----- Original Message ---- From: Adriano Rezende <adriano.reze...@openbossa.org> To: Petrus Lundqvist <petrus.lundqv...@nokia.com> Cc: Jason H <scorp...@yahoo.com>; "qt-qml@trolltech.com" <qt-qml@trolltech.com> Sent: Thu, December 2, 2010 9:51:42 AM Subject: Re: [Qt-qml] QML JS Weirdness On Thu, Dec 2, 2010 at 11:22 AM, Petrus Lundqvist <petrus.lundqv...@nokia.com> wrote: > And not to nit-pick, but you don't even get the index of the property > but the "name" of the property, i.e. the name of the index. So the > result is a string rather than a number. Yes, I'm talking about index as a key, since it can be used to iterate over generic js objects as well. > [textAnimation, eyeAnimation, eyeOutline, > pulseAnimation].forEach(function(animation) { > if (!value && animation.running) ... > }); Well, instead of using JS, I think it's always better to use QML features to solve simple issues like this. In this case, QML property bindings will do all the work in the C++ side and will also reduce the number of lines of code in JS side. Br, Adriano _______________________________________________ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml