[Kde-bindings] SmokeKDE Ruby Hello World works

Richard Dale Richard_Dale at tipitina.demon.co.uk
Wed Sep 17 13:37:24 UTC 2003


On Tuesday 16 September 2003 16:16, Richard Dale wrote:
> I've just checked in some changes to the kalyptus parser and Smoke code
> generation, so it parses the current kdelibs ok - it just does the whole of
> the Qt/KDE libs and puts the whole lot in a single libsmokekde.so. It
> compiles, but I haven't tried it yet.
After some problems getting smokekde to link, I've just got a KDE ruby hello 
world to work!

#!/usr/bin/env ruby -w

require 'Qt'

about = KDE::KAboutData.new("one", "two", "three")
KDE::KCmdLineArgs.foobar(1, ["four"], about)
a = KDE::KApplication.new()
hello = KDE::KPushButton.new(nil) { setText "Hello World" }
a.setMainWidget(hello)
hello.show()
a.exec()

The KCmdLineArgs method is called foobar() because there's a problem in ruby 
with a conflict between an existing builtin method init() and the 
KCmdLineArgs one which I haven't sorted out yet.

I've checked in the changes to kalyptus that were needed to get libsmokekde.so 
to link. Looking good :)

-- Richard


More information about the Kde-bindings mailing list