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

Alexander Kellett lypanov at kde.org
Tue Jan 13 09:43:53 UTC 2004


On Tue, Jan 13, 2004 at 09:28:16AM +0000, Richard Dale wrote:
> Just remember the rule 'I before E except after C', then remember it's wrong, 
> I suppose that's what I do. Sorry about this, spelling corrections should be 
> OT on this list.

:)

> I thought it wouldn't start with a URL in BASEDOCURL for you, but it did for 
> me. But, it did crash when I pressed the debug button - or at least exited.

hehe :)

> 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 '"' + blah.data.string + '"'
> 
> 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
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 :(

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.

cheers,
Alex

-- 
When women love us, they forgive us everything, even our crimes; when they do
not love us, they give us credit for nothing, not even our virtues.
		-- Honor'e de Balzac



More information about the Kde-bindings mailing list