[Qt-qml] QML JS Weirdness
Kent Hansen
kent.hansen at nokia.com
Fri Nov 19 08:08:16 CET 2010
Hi,
Den 19. nov. 2010 03:22, skrev ext Jason H:
> So, I think I got this figured out.
>
> QML doesn't support the for each ( ... in ...) construct, just for ( ... in
> ...), thus requiring me to use subscripts.
>
"for each" is a Mozilla-specific JS extension.
You could use Array.prototype.forEach, which is standard (since ES5).
E.g.
[textAnimation, eyeAnimation, eyeOutline, pulseAnimation].forEach(function(animation) { ... });
Regards,
Kent
More information about the Qt-qml
mailing list