[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    [Kde-bindings] methods missing from ruby bindings when using smoke
From:       Stefano Crocco <stefano.crocco () alice ! it>
Date:       2009-10-15 13:48:26
Message-ID: 200910151548.26999.stefano.crocco () alice ! it
[Download RAW message or body]

After succeeding in building smoke with the new generator, I found out two 
problems running my programs using the ruby bindings.

The first problem is that the KDE::SharedConfig doesn't seem to have a #group 
method anymore. Looking at the KDE api, that method is defined in the 
KConfigBase, from which KDE::SharedConfig is derived, so I think it should be 
availlable. You can see this error running the following code.

require 'korundum4'

data = KDE::AboutData.new "test", "", KDE::ki18n("Test"), "0.0.0"

KDE::CmdLineArgs.init ARGV, data

a = KDE::Application.new
c = KDE::Global.config
c.group 'xyz'

The last line causes the error:

in `method_missing': undefined method `group' for 
#<KDE::SharedConfig:0x825caa0> (NoMethodError)

The second problem is that Qt::SizePolicy#setHorizontalStretch doesn't seem to 
work. According to rbqtapi, a binding for the 
QSizePolicy::setHorizontalStretch exists, but in practice it doesn't work. 
This can be seen in any file generated by rbuic, such as that contained in the 
calculatorform qtruby example. Running it, it gives:

ui_calculatorform.rb:32:in `method_missing': undefined method 
`setHorizontalStretch' for #<Qt::SizePolicy:0x8404d04 horizontalPolicy=5, 
verticalPolicy=5> (NoMethodError)

I don't know whehter this is an issue with the new smoke generator or not. The 
fact is that if I replace the new version of smoke with an old one, build 
using kalyptus (revision 1000944) everything start working again. So, I think 
that either the new generator or some other change in smoke since that 
revision should be blamed for these issues (of course, provided I'm not doing 
something wrong).

Maybe this is a known issue, but I chose to report it just in case it wasn't.

Thanks in advance

Stefano



_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic