[Kde-bindings] korundum: KURL::List as param to DCOP call

Richard Dale rdale at foton.es
Mon Jan 8 11:35:53 UTC 2007

On Monday 25 December 2006 08:35, Glenn Ergeerts wrote:
> On Sunday 24 December 2006 19:23, Pau Garcia i Quiles wrote:
> > Send a Ruby array of KDE::URL items
> i tried that already but now i found my mistake:
> irb(main):007:0> a = Array.new
> => []
> irb(main):008:0> a.push(KDE::URL.new("http://..."))
> =>[#<KDE::URL:0xb51e74e4url="http://dl.google.com/earth/kml/kml_samples/Yos
> irb(main):009:0> dcopRef.send("addTransfers", a, "/tmp")
> ArgumentError: NULL pointer given
>         from /usr/lib/ruby/1.8/KDE/korundum.rb:333:in `dcop_send'
>         from /usr/lib/ruby/1.8/KDE/korundum.rb:333:in `send'
>         from (irb):9
> irb(main):010:0>
> This crashes on the following line (in DCOPRef.send):
> return KDE::dcop_send(self, fun, Qt::Internal::getMocArguments(sig),	*k )
> The problem is that i didnt specifiy the type of the params to the DCOP
> call in dcopRef.send(). I looked in the code and when no params are given
> korundum tries to retrieve the type from the param given to dcopRef.send()
> . Parameter "a" is a ruby Array which gets translated to a QStringList,
> which explains the crash..
> When i change the code to this:
> dcopRef.send("addTransfers(KURL::List, QString)", a, "/tmp")
> it works!
OK, that's a bug, and I'm not sure how difficult to fix it would be - I'll 
have a look. But as you can work round it at least it isn't holding you up.

-- Richard

More information about the Kde-bindings mailing list