[Kde-bindings] Problem when doing Ruby Plasma

Richard Dale rdale at foton.es
Mon Jul 28 11:47:41 UTC 2008


On Monday 28 July 2008 12:03:41 Florian Falkner wrote:
> Hello List,
>
> I'm trying to get started with Ruby/Plasma development. I compiled KDE and
> the Kdebindings with kdesvn today from SVN. After going through the example
> shown http://techbase.kde.org/Development/Tutorials/Plasma/RubyApplet I get
> the following error, complaining about an incompatible API version:
>
> plasmoidviewer(11975)/libplasma Plasma::CoronaPrivate::addContainment:
> loading of containment "null" failed. plasmoidviewer(11975)/kdecore
> (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from 
> "/tmp/kdecache-kde-devel/ksycoca4" findServiceByDesktopPath:  not found
> plasmoidviewer(11975)/libplasma Plasma::AppletPrivate::init: Check your
> constructor! You probably want to be passing in a Service::Ptr or a
> QVariantList with a valid storageid as arg[0].
> plasmoidviewer(11975)/libplasma Plasma::isPluginVersionCompatible: plugin
> is compiled against incompatible Plasma version   4294967295
> plasmoidviewer(11975)/libplasma Plasma::ContainmentPrivate::addApplet:
> Applet "plasma-ruby-web-applet" could not be loaded.
> findServiceByDesktopPath:  not found
> plasmoidviewer(11975)/libplasma Plasma::AppletPrivate::init: Check your
> constructor! You probably want to be passing in a Service::Ptr or a
> QVariantList with a valid storageid as arg[0].
>
> Any hints?
It looks like you need a plugin version entry in your .desktop file for the 
applet:

X-KDE-PluginInfo-Version=0.1

I'm not sure if 0.1 is right, but it should be something like that.

There are now two ways to write Plasma applets in Ruby - the first is using 
the C++ api as described in the tutorial on techbase, and the second is using 
the new ScriptEngine based ruby bindings. You should really use the 
ScriptEngine api if possible as it allows the plasmoid packaging mechanism to 
be used. I've been meaning to add some examples of how to use the 
ScriptEngine api to write applets, and the only documentation at the moment 
is my blog about it:

Writing Plasma Applets in C# and Ruby
http://www.kdedevelopers.org/node/3560

-- Richard




More information about the Kde-bindings mailing list