[Kde-bindings] suggestion_box << "better errors"

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Jul 26 07:40:45 UTC 2004


On Monday 26 July 2004 07:45, jm wrote:
> You may have already thought of this, but it would be extremely helpful
> to have better error reporting from qtruby. For example,
>
>    in `const_missing': unresolved method call (ArgumentError)
>
> should say what method/constant it was searching for. This has hit me a
> couple of times.
I've added the missing constant or method to the error messages now - that 
should have been done a while ago.

This incorrect line:
color_group.setColor( ColorGroup::MyMissingConst, blue )

Gives this error:
splitter.rb:16:in `const_missing': unresolved constant reference 
MyMissingConst (ArgumentError)

> In current case I have the same line
>
>
> @accel.connectItem(@accel.insertItem(Qt::
> KeySeqence.new(button.keycode)),self,SLOT(action))
>
> in two different places one works and the other doesn't and I can't
> work out why.
Not sure about this without example code. Should 'button' and 'action' be 
instance variables '@button' and '@action' - are they initialised in some 
parts of the code, but not in others?

> Another example, being the idiot that I am, I sometimes put the
> application widget where I mean to put the main widget and ruby seg
> faults. This produces something like this,
>
> ./stb_menubar.rb:26: [BUG] Segmentation fault
> ruby 1.8.1 (2003-12-25) [i686-linux]
>
> Aborted
It might be possible to trap this error - but could you post some example 
code?

-- Richard



More information about the Kde-bindings mailing list