Plasma services within Javascript

Diego Casella ([Po]lentino) polentino911 at gmail.com
Tue Mar 8 16:34:01 CET 2011


Hey guys,

after a long time without playing with scripted plasmoid, I've noticed that
using a Service is somewhat broken.
I've even tried to follow the steps descibed here [0], of course changing
the following line from
service = engine.serviceForSource("notification");

to
service = plasmoid.service("notifications", "notification");

but I'm still getting a "TypeError: Result of expression
'plasmoid.service'[undefined] is not a function."
Does anybody know where I'm wrong?

Oh, an other thing, really strange: seems like the "X-Plasma-MainScript"
entry is completely ignored. I've tried to start a Js
plasmoid , but the previewer shows nothing unless I rename the main script
from "project_name.js" to "main" ( back in the old days,
I set plasmate to name the mainscript as "project_name.js", thus
"X-Plasma-MainScript=code/project_name.js", and we had never
encountered a problem like this).
This issues happens even wihtin plasmoidviewer, so perhaps something changed
inside Plasma?
Cheers

Diego



[0]
http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/CheatSheet#Notifications
-- 
H: Who is Watson without Sherlock Holmes?
G: Watson was a genius in his own right.

My personal blog: http://polentino911.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20110308/c5c48987/attachment.htm 


More information about the Plasma-devel mailing list