[Kde-java] How to use Client.send(...)/call(...) / Code samples?

Kevin Krammer kevin.krammer at gmx.at
Sun Sep 9 22:56:14 CEST 2007


On Sunday 09 September 2007, Kai Denker wrote:
> Hi!
>
> I want to use org.kde.DCOP.call(...) respectively .send(...) to call the
> function "openComposer()" on kmail. I wonder how to pass arguments to the
> function I want to call.
>
>  c.send("kmail", "KMailIface", "openComposer()", ...);
>
> I guess, I have to insert them at the dots, but I don't know how to this,
> since the signatures of send and call expect an array of bytes or a single
> string.

In C++ it works like this:

- create a byte array
- create a QDataStream on this array
- write your arguments into it
- use the serialized data as the function's argument.

Btw, the method signature needs to include the parameter types(not their names 
though).
No sure if you need to write "QString" or "String" in such a signature.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-java/attachments/20070909/70ff530e/attachment.pgp 


More information about the Kde-java mailing list