[Kde-bindings] KDevelop ruby support

Richard Dale Richard_Dale at tipitina.demon.co.uk
Fri Oct 22 11:08:06 UTC 2004


On Friday 22 October 2004 11:40, Thibauld Favre wrote:
> Hi Richard,
>
> I've seen that you've been enhancing KDevelop ruby support lately.
> I wanted to give you a few feedbacks about your Korundum template :
> - First, it seems weird that we have to "build" a project based on a
> scripting language :) I suppose there's no choice if you want to fit in the
> kdevelop framework.
Yes, it uses automake and it took me a bit of puzzling out how all that 
worked. It needs some install rules so that you can run the app like a normal 
KDE one. I wondered if it might be a good idea to have a top level shell 
script to start the ruby code, install that in the KDE bin dir with the ruby 
under $KDEDIR/share/apps/<appname>..

I would say the advantage of the build step is that you can invoke the make 
rules to generate ruby source from the .ui files via rbuic. I think there is 
a run button, so that probably builds and runs. It doesn't quite work yet 
because I think it is expecting the ruby scripts to be in the top level of 
the project, rather than under src.

> - Then I had problems running the application because your class names all
> begin with a small letter ("testPreferences") instead of a capital letter
> ("TestPreferences"). On my system, ruby refuses to execute with this type
> error :
> -------------------
> main.rb:5:in `require': ./testiface.rb:1: class/module name must be
> CONSTANT (SyntaxError)
> class testIface < KDE::DCOPObject
>                  ^      from main.rb:5
You need to type a name starting with upper case, in the Application Name 
field in the Create New Project wizard. It should then convert that to lower 
case for the project directory, but leave it as it is for the class names.

> -------------------
> - Once you get rid of those errors, I'm still unable to execute the program
> : --------------------
> main.rb:10: undefined method `I18N_NOOP' for main:Object (NoMethodError)
> --------------------
> I suppose it's working on your system, what am I supposed to do to have it
> work on mine ?
Yes, I've only recently added that to the HEAD branch - you'll need to update 
your cvs.
> Thanks a lot for your great work !
Thanks. I've only spent about a day or so on it, but I think I already prefer 
it to Kate because class browser makes it so much easier to find things. Next 
I want to add slots/signals declaration navigation to the class browser, and 
allow multi-line attr declarations. And a few more templates, like a DCOP 
service, and improve the existing qtruby one so it is a port of the C++ 
qmakeapp with a main window and menus etc.

Nested classes are a problem with the way the parser works - I haven't decided 
what to do about them yet.

-- Richard



More information about the Kde-bindings mailing list