#!/usr/bin/env kross

require 'Kross'
require 'KrossModuleTutorial'

forms = Kross.module("forms")
mainwidget = KrossModuleTutorial.widget()

label = forms.createWidget(mainwidget, "QLabel")
label.wordWrap = true
label.text = "This is the Ruby script <b>sample_forms.rb</b> that says <b>Hello World :-)</b><br><br>"+
             "There seems to be a bug in the krossruby-backend. The application crashes if this "+
             "script got executed a second time. Backtrace;<br><pre>"+
             "#0  0xb6353db9 in rb_type (obj=17479984) at /usr/lib/ruby/1.8/i486-linux/ruby.h:682\n"+
             "#1  0xb6357fed in Kross::RubyType<QString, unsigned long>::toVariant (value=17479984)\n"+
             "    at /home/kde4/koffice/libs/kross/ruby/rubyvariant.h:231\n"+
             "#2  0xb63580fb in RubyMetaTypeVariant (this=0x80c7c10, value=17479984)\n"+
             "    at /home/kde4/koffice/libs/kross/ruby/rubyvariant.h:331\n"+
             "#3  0xb63543f0 in Kross::RubyMetaTypeFactory::create (typeId=10, value=17479984)\n"+
             "    at /home/kde4/koffice/libs/kross/ruby/rubyvariant.cpp:231\n"+
             "#4  0xb635f540 in Kross::RubyCallCache::execfunction (this=0x81421d0, argc=1, argv=0xbfe6d5e0)\n"+
             "    at /home/kde4/koffice/libs/kross/ruby/rubycallcache.cpp:87\n"+
             "#5  0xb635f8af in Kross::RubyCallCache::method_cacheexec (argc=1, argv=0xbfe6d5e0, self=3055786200)\n"+
             "    at /home/kde4/koffice/libs/kross/ruby/rubycallcache.cpp:143\n"+
             "</pre>"
