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

Glenn Ergeerts glenn.ergeerts at telenet.be
Mon Dec 25 08:35:18 UTC 2006

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://..."))
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

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!


More information about the Kde-bindings mailing list