[Kde-bindings] Ruby bindings - slot syntax
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Wed Dec 3 01:58:54 UTC 2003
On Tuesday 02 December 2003 19:12, Marek Janukowicz wrote:
> I recently downloaded Ruby bindings for Qt from
> http://www.lypanov.net/bindings.html. I quite impressed, but one thing
> bothers me - the slot syntax. Would it be possible to use :slot_name
> instead of "slot_name()" when declaring and using a slot? This is much
> more "Ruby Way" I think.
I agree that using an id instead of a string would look more like a ruby
access control declaration. I would like to change the slot declarations so
that you can specify ruby types, rather than C++ ones, but I had been
thinking of keeping the slots as strings.
(i) slots 'foobar()'
(iii) slots :foobar
(i) slots 'baz(int, const QString&)'
(ii) slots 'baz(Integer, String)'
(iii) slots :baz, Integer, String
So if it were possible to solve the problem of using ruby types rather than
C++ ones (tricky technically, but possible), does style (iii) look better
than style (ii)? I think maybe it does, but it needs more thought..
-- Richard
More information about the Kde-bindings
mailing list