[Kde-bindings] Problem when doing Ruby Plasma

Richard Dale rdale at foton.es
Wed Jul 30 17:23:23 UTC 2008


On Wednesday 30 July 2008 17:42:22 Florian Falkner wrote:
> > 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.
>
> Mhmm, the entry is present. Could it be that krubypluginfactory is the
> problem?
No I don't think so - there is no .desktop associated with the 
krubypluginfactory except the one you give it. I cc'd my reply to your last 
mail to the plasma development list, but nobody has replied yet. So I'm still 
not sure what the versions should be and in which .desktop files.

> > 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
>
> Thanks, I've read the blog, but couldn't follow the example. In fact I'm
> stuck at that sentence, which is somehow unclear to me:
>
> "Here is an example of the Tiger applet for showing an svg in Ruby, it is
> always called 'main.rb' with class 'Main' in the module with the same
> module name as the applet's directory (converted to camel case), under a
> directory called 'tiger/contents/code':"
>
> Where do I have to place the folder "tiger/contents/code/main.rb", that it
> get's recoginzed by the scriptengine? Or is it
> "tiger/contents/code/tiger/main.rb"? I've compiled KDE4 under
> "/home/kde-devel/kde" with kdesvnbuild.
You need to use the plasmapkg tool to install the applet (in the parent 
directory of tiger):

$ plasmapkg --install tiger --type plasmoid

And it will put it under your ~/.kde4 directory.

> Thanks for your patience :-)
And yours! No problem, it's very interesting to get feedback. We'll try and 
get this stuff better documented with some more examples, at Akademy in a 
couple of weeks, as the Plasma devs will be there and will be able to help. 
I'll try and see if I can get the tiger working ok with the current Plasma in 
trunk as soon as I can.

-- Richard



More information about the Kde-bindings mailing list