cast_object_to bug / PerlQt cvs compilation (Was Re: [Kde-bindings] [Bug 71316] QtRuby : Segmentation fault when loading Qt)

Richard Dale Richard_Dale at
Tue Jan 13 09:56:54 UTC 2004

On Tuesday 13 January 2004 09:43, Alexander Kellett wrote:
> On Tue, Jan 13, 2004 at 09:28:16AM +0000, Richard Dale wrote:
> > This works fine for me:
> >
> >          puts "NODE NAME :: #{node.inspect}"
> >          if node.nodeType == DOM::Node::TEXT_NODE
> >             blah = Qt::Internal::cast_object_to(node, "DOM::Text")
> >             str = puts '"' + + '"'
> >
> > It's just that the classname string was wrong (no KDE:: needed), which I
> > think is a good argument for passing a Class instead.
> oh, aaah. so thats why the constant wasn't working,
> i was still trying to debug this last night but got
> no further. i'm making these sorts of errors really
> frequently so i'm gonna stick something in there
> to print a list of matched classes on such failures
Good idea, but only do that if a suitable debug flag is set, so the user has 
some control.

> it'll make prototyping much faster. introspection as
> a whole really needs to be improved actually, so
> DOM::Node.{constants,singleton_methods,new.methods}
> etc should all work.
> debugging in qtruby/korundum is a bit messed up
> atm as somewhere along the line i think a call_super
> was removed which was needed for proper error messages,
> now even ruby errors such as variable name typos hit
> the method_missing stuff in qtruby and the real error
> is therefore never produced :( i'll fix this tonight
> as its a pretty major showstopper :(
I removed it because I thought it improved the error messages. What is the 
difference between qtruby indicating a method is missing, and the normal ruby 
Object error - what do you mean by 'real error'? That should only be for 
subclasses of Qt:: which don't have non-Qt behaviour to preserve, not all 
ruby classes.

> please see my branch on the korundum examples directory
> for more interesting stuff, due to the freeze i'm unable
> to commit to head for the coming weeks so i'll use the
> branch to develop examples.
I've no idea why we have to put examples in a branch, rather than straight in 
HEAD, when the project isn't built be default. What's the branch called it - 
I'll have a look?

-- Richard

More information about the Kde-bindings mailing list