On Thursday, June 2, 2011 23:22:29 todd rme wrote: > Hi, > > I am working with the digital clock qml example in > kdeexamples/plasma/declarative/digital-clock > > One thing I am trying to do is extract and output the seconds from the > dataengine. The original example has this at line 54: > > Text { text: 'Time Is ' + dataSource.data['Local']['Time']; } > > This displayed the time correctly. I converted it to: > > Text { text: 'Time Is ' + dataSource.data['Local']['Time'].second(); } > > This returned following error: > > main.qml:54: TypeError: Result of expression > 'dataSource.data['Local']['Time'].second' [undefined] is not a > function.
it would be getSeconds(), since it is supposed to be using the standard Javascript object for times ... however, it seems that QTime objects are not actually being translated into something useful :/ a small tweak to the dataengine should fix this by providing a complete DateTime object with both date and time, which QScript would then handle. > Text { text: 'Time Is ' + > dataSource.data['Local']['Time'].split(":")[0]; } Time.toString().split(":")[0] -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Development Frameworks
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel