[Kde-bindings] exception raised by calling super in override of KDE::PageDialog#exec
Arno Rehn
arno at arnorehn.de
Mon Oct 20 11:57:50 UTC 2008
This is now fixed in SVN.
Maybe we should override all the Kernel methods in Qt::Base and check whether
the current class supports them. If they don't, we simply call the appropiate
method of Kernel. We would get rid of a whole lot of class specific code in
qtruby and korundum.
On Monday 20 October 2008 12:06:29 Stefano Crocco wrote:
> 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
>
>
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings
--
Arno Rehn
arno at arnorehn.de
More information about the Kde-bindings
mailing list