This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Unable to run javascript based Plasmoid using Plasmoidviewer

Tags: kde, plasma, plasmoidviewer kde, plasma, plasmoidviewer kde, plasma, plasmoidviewer
(comma "," separated)
Krishna
Registered Member
Posts
1
Karma
0
Hi Team,

I am not sure that this is the right place to discuss the problem which i am facing, so please guide me if it is not

Problem faced:
I tried to create a JavaScript based Plasmoid referring tutorial at https://techbase.kde.org/Development/Tutorials/Plasma4/JavaScript/GettingStarted

This is my DIR structure

hello-javascript
   ├─ contents
   │   └─ code
   │   └─ main.js
   └─ metadata.desktop

Contents of file metadata.desktop
Code: Select all
[Desktop Entry]
Name=Hello JavaScript
Comment=An example JavaScript widget
Icon=chronometer
 
Type=Service
X-KDE-ServiceTypes=Plasma/Applet
 
X-Plasma-API=javascript
X-Plasma-MainScript=code/main.js
X-Plasma-DefaultSize=300,400
 
X-KDE-PluginInfo-Author=Krishna
X-KDE-PluginInfo-Email=mail@mail.com
X-KDE-PluginInfo-Name=hello-javascript
X-KDE-PluginInfo-Version=1.0
X-KDE-PluginInfo-Website=www.mail.com
X-KDE-PluginInfo-Category=Examples
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true

Contents of file main.js
Code: Select all
layout = new LinearLayout(plasmoid);
 
label = new Label();
layout.addItem(label);
 
label.text = 'Hello Javascript!';

If tried to install this plasmoid from root dir (hello-javascript) using command
plasmapkg -i .

Then its getting installed with message "Successfully installed /mnt/WORKs/R & D/hello-javascript".

But if I tried to run it using plasmoidviewer like,
plasmoidviewer .

Following messages logged in the shell in which this command invoked,
QML debugging is enabled. Only use this in a safe environment.
file:///usr/lib64/qt5/qml/QtQuick/Controls/Styles/Base/ButtonStyle.qml:150:31: QML Item: Binding loop detected for property "implicitWidth"
file:///usr/lib64/qt5/qml/QtQuick/Controls/Styles/Base/ButtonStyle.qml:150:31: QML Item: Binding loop detected for property "implicitWidth"
file:///usr/lib64/qt5/qml/QtQuick/Controls/Styles/Base/ButtonStyle.qml:150:31: QML Item: Binding loop detected for property "implicitWidth"
file:///usr/lib64/qt5/qml/QtQuick/Controls/Styles/Base/ButtonStyle.qml:150:31: QML Item: Binding loop detected for property "implicitWidth"
file:///usr/lib64/qt5/qml/QtQuick/Controls/Styles/Base/ButtonStyle.qml:150:31: QML Item: Binding loop detected for property "implicitWidth"
unversioned plugin detected, may result in instability
Toolbox not loading, toolbox package is either invalid or disabled.
QObject::connect: invalid null parameter
QObject::connect: invalid null parameter
QObject::connect: invalid null parameter

The plasmoidviewer is getting opened with a plasmoid, but having an error message in it. The Error message shown in Plasmoidviewer is
Error loading Applet: package inexistent. Could not create a javascript ScriptEngine for the Hello JavaScript widget.


Please guide me


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]