[Kde-bindings] Implementing Ruby DCOP
Ashley Winters
jahqueel at yahoo.com
Fri Sep 26 02:02:25 UTC 2003
--- Richard Dale <Richard_Dale at tipitina.demon.co.uk> wrote:
> params = ""
> stream = Qt::DataStream.new(params, IO_WriteOnly)
> stream << pid
> $kapp.dcopClient().emitDCOPSignal("clientDied(pid_t)", params)
>
> That doesn't look as friendly as:
>
> $kapp.dcopClient().emitDCOPSignal( clientDied(pid) )
>
> Which is more like emitting an ordinary signal. It needs more
> thought..
If I were writing it for Perl, I would likely hijack dcopClient() (or
the object it's returning) to return an object which would accept
methods through AUTOLOAD. I'd try to make it work like:
$kapp->dcopClient->clientDied($pid)
I suspect something similar is possible in Ruby, if so inclined?
Ashley Winters
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
More information about the Kde-bindings
mailing list