[Kde-bindings] Re: More dcop signal questions
sniffy at rogers.com
Thu Jun 9 22:29:02 UTC 2005
Richard Dale wrote:
> On Wednesday 08 June 2005 20:41, Chris Gow wrote:
>> 1. How come dcopslot.rb has to be started after dcopsignal.rb? If I
>> reverse the starting order or restart dcopsignal, the doit( ) slot in
>> dcopslot is never called.
> The connect call in dcopslot.rb has 'volatile' as true, so the connect
> only works if the sender exists:
> result = slottest.connectDCOPSignal("dcopsignal", "SenderWidget",
> "testEmitSignal(QString)", "mySlot(QString)", true)
Ahh. Ok. I actually read that from the DCOP documentation earlier but now
that I'm actually using DCOP I understand the use of the flag better.
>> 2. Why does dcopsignal need to be a KDE::UniqueApplication in order for
>> the signal/slot mechanism to work? I would like dcopslot to listen to all
>> instances of dcopsignal. How would I go about configuring dcopslot to do
> It will work as a KDE::Application, but the dcop ref has the pid as part
> of its name, for instance 'konqueror-1977', rather than just 'konqueror'
> for a KDE::UniqueApplication
Hmm..Ok, so using the examples, I have changed dcopsignal.rb to be
KDE::Application and in dcopslot.rb I have changed the connect line to:
result = slottest.connectDCOPSignal("dcopsignal-*", nil,
"testEmitSignal(QString)", "mySlot(QString)", false)
And dcopslot is never notified of the signal (I tried both false and true as
the volatile flag). I've also tried replacing the nil with "SenderWidget".
None of the combinations seem to work.
>> 3. In the documentation for dcop signals on the KDE developer site, I
>> should be able to connect a slot to any signal with the following line
>> (this is C++): connectDCOPSignal(0, 0, "clientDied(pid_t)",
>> "clientDied(pid_t)", false); can I do something similar in korundum?
>> (related to 2 above)
> Yes, I would expect it to work - if not report any problems on
Yes it works. The problem was the volatile flag
Thanks for all of your help so far Richard!
More information about the Kde-bindings