[Kde-bindings] korundum: KURL::List as param to DCOP call
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):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'
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")
More information about the Kde-bindings