[Kde-bindings] Implementing Ruby DCOP
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Fri Sep 26 12:04:37 UTC 2003
On Friday 26 September 2003 12:30, Alexander Kellett wrote:
> On Fri, Sep 26, 2003 at 11:33:13AM +0100, Richard Dale wrote:
> > I agree it's a good idea to do a second lightweight thing. But, I'm not
> > so sure it's trivial to implement entirely in ruby - I think you need a
> > proxy DCOPObject written in C++ for the dcop slots side. DCOPObject won't
> > be in the Smoke runtime because it has pure virtual methods.
>
> oh. i thought this could all be done dynamically...
> ian worked on something like this. i'll ask him.
Well, it's only a small amount of C++. I don't like C++ much at all, but I
don't think we need to ban it entirely from KDE ruby bindings just yet! I
think it's ok in small quantities (ideally that someone else wrote)..
I think it has to go via the Smoke stack and marshalling because you can't
distiguish between say 'clicked(short)' and 'clicked(int)' at the ruby level
- they are both Fixnums. If you try QDataStream '<<' on a ruby number you
probably get an ambiguous method error, because it would know whether you
meant a short or an int or a long.
But the way I suggest is still dynamic because it would use the Smoke runtime,
although from C. That's not the same as having extra hard coded marshallers
for all the '<<' and '>>' QDataStream operaters.
-- Richard
More information about the Kde-bindings
mailing list