can't access methods of data engine output for digital-clock declarative example

Shaun Reich shaun.reich at kdemail.net
Thu Aug 4 21:14:54 UTC 2011


On Fri, Jun 3, 2011 at 4:17 AM, Aaron J. Seigo <aseigo at kde.org> wrote:
> 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.

Reviving this thread as I have a similar issue...how could one access,
for instance the time without milliseconds? e.g. getSeconds() and such
does not work.

Why do the bindings use the javascript extensions in the first place.
I would've thought it'd make more sense to use qt's api which at a
glance[1] seems far more thorough than javascript's[2].

Or what if I want the month's localized name, or day? e.g. February,
Thursday or whatever. Seems impossible even if we were using pure
javascript, from what I see.

[1] http://doc.qt.nokia.com/4.7/qdatetime.html#toString
[2] http://www.w3schools.com/jsref/jsref_obj_date.asp

-- 
Shaun Reich,
KDE Software Developer (kde.org)


More information about the Plasma-devel mailing list