[Kde-bindings] Minimal dcop client
Han Holl
han.holl at pobox.com
Mon Dec 19 21:59:12 UTC 2005
Hello,
I have a ruby script that does system("dcop ..... ") calls, and I want to
replace them with call from ruby directly.
What I want to write is roughly:
require 'Korundum'
dk = KDE::DCOPRef.new('kdesktop', 'KBackgroundIface')
dk.setWallpaper('/backup/tinelot/ting/winter 2002/imm016_edited.jpg', 4)
What I have to write though:
require 'Korundum'
KDE::CmdLineArgs.init(KDE::AboutData.new("a", "", '', '', 0))
KDE::Application.new
dk = KDE::DCOPRef.new('kdesktop', 'KBackgroundIface')
dk.setWallpaper('/backup/tinelot/ting/winter 2002/imm016_edited.jpg', 4)
I find this kind of unsatisfactory: apparently KDE::Application.new, does more
than just construct a KDE::Application: it has side effects that enable the
KDE::DCOPRef call in some secret magic way.
Also KDE::Application.new doesn't work without the line above it: wouldn't it
be clearer if something you need is a required contructor argument ?
If you omit the initialization lines, you get a quite mystifying error
message.
And while trying to figure all this out I had a couple of SEGFAULTS.
Richard if you're interested I'm sure I can reconstruct a couple of them.
Cheers,
Han Holl
More information about the Kde-bindings
mailing list