Registered Member
|
First of all, apologies if this is in the wrong forum.
I am trying to write a simple plasmoid using the Javascript API, and would like to include a KUrlRequester widget in the configuration UI, but cannot find any way of reading the URL that the user picks. So far, as a test, I have added the following function definition in the Javascript:
which clearly does nothing useful except report the value to the terminal. My config.ui file has:
and the Kcfg file has:
When I run the plasmoid, the configuration UI is rendered correctly, but no matter what value I enter in the URL requester, the script always prints the empty string as the result of the call to plasmoid.readConfig(). I have found I can readily read values of type String from KLineEdit widgets, or Boolean values from QRadioButton widgets, but this one is defeating me. Any help would be greatly appreciated! Thanks in advance. |
Registered Member
|
Further to my original post: I think this is a gap in the Plasma Javascript API.
If I make the fairly simple changes to embed my Javascript in an HTML file, change the config/main.xml file to have
and use the webkit API instead, then the KUrlRequester widget on the configuration dialog works as I would expect. Also, converting the script to Python (rather harder for me because I know nothing about Python!) seems to work as expected. It's not clear to me whether this is a bug in the Plasma Javascript API, or just something that hasn't been written (or perhaps not yet). |
Administrator
|
I suggest you ask about this problem on kde-devel@kde.org as this definitely appears to be a bug.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft