[Kde-bindings] exception raised by calling super in override of KDE::PageDialog#exec
Stefano Crocco
stefano.crocco at alice.it
Mon Oct 20 10:06:29 UTC 2008
I already reported a similar bug concerning KDE::Dialog#exec with korundum4
and it was corrected there and in some other places. However, the problem
still exists with KDE::PageDialog. Here's the failing code:
require 'korundum4'
class MyDlg < KDE::PageDialog
def exec
puts "exec"
super
end
end
data = KDE::AboutData.new "kruby", "", KDE::ki18n("KRuby"), "0.0.1"
KDE::CmdLineArgs.init [], data
a = KDE::Application.new
MyDlg.new.exec
The error message is:
./prova.rb:6:in `exec': wrong number of arguments (ArgumentError)
from ./prova.rb:6:in `exec'
from ./prova.rb:16
I tried fixing the problem by adding the same code which was used for
KDE::Dialog in korundum4.rb, and it seems to work. Here's the patch (it
should be applied from the kdebindings/ruby/korundum/src/lib/KDE directory)
--- old/korundum4.rb 2008-10-20 11:53:10.000000000 +0200
+++ new/korundum4.rb 2008-10-20 12:01:05.000000000 +0200
@@ -309,6 +309,12 @@
end
end
+ class PageDialog < Qt::Base
+ def exec(*args)
+ method_missing(:exec, *args)
+ end
+ end
+
class DoubleNumInput < Qt::Base
def range=(arg)
if arg.kind_of? Range
Stefano
More information about the Kde-bindings
mailing list