DCOPRef and dynamic stubs ( 3.1? )
ettrich at trolltech.com
Mon Sep 9 13:15:19 BST 2002
On Monday 09 September 2002 13:51, Simon Hausmann wrote:
> int foo = DCOPRef( "kdesktop" ).method( "int fooForBar" ).arg( blah ).arg(
> url, "KURL" ).call();
> Not as beautiful as one call, but general and easy to extend for
> custom types :-)
True. In my system (if KURL was unknown), we'd have to type
int foo = DCOPRef( "kdesktop" ).call( "fooForBar(int,KURL)", blah, url );
Hey, what about another template DCOPArg which allows you to specify a type?
Then we could do
int foo = DCOPRef( "kdesktop" ).call( "fooForBar",
DCOPArg( url, "KURL" );
btw: you never need to specify the return type with "int foo.."
More information about the kde-core-devel