[Kde-bindings] QtRuby virtual method callbacks

Germain Garand germain at ebooksfrance.org
Fri Jul 18 16:57:37 UTC 2003


Le Jeudi 17 Juillet 2003 09:39, Richard Dale a écrit :
> interface. The main thing still to be done are signals/slots, and I think
> I'll put it in the cvs when they're working. Yesterday I found the sources
> 'slots.pm, signals.pm and isa.pm' under lib/Qt - I hadn't realised they
> were there. I had just kept staring and staring at Qt.pm trying to see how
> it worked, but when I got to see 'isa.pm' the lightbulb finally switched on
> in my head :)

ah, that brings bad memories to me :)
... I had a hard time grasping that as well
That's why I added the comment above getMetaObject, but I forgot to add the 
location of isa.pm & friends. Fixed.

> I've attached a current snapshot of qtruby. I'm working through the
> tutorials, and am up to t4.rb. To get that working I need to add a custom
> QApplication constructor to set up the Qt::app class variable, like PerlQt.
> There is a bug in the smoke munged name for the method - it's
> 'QApplication$?' when it should be 'QApplication?$' for 'int&, char**' 

mmh, but why?
"$" is for scalars, and I think that's what all languages will use for 
marshalling "int&".
char** ought to be fed by the target language's equivalent of an array of 
strings, so "?" looks right aswell...

Now, IMHO, no peculiarities of the target languages should go into smoke... 
it's just the exact reflection of an API, so tweaking this API looks rather 
like the Smoke user's job. KISS!

> Oh dear it hasn't even got going! I usually have problems with pthreads
> (and dynamic_casts too) when l link against libs built with different
> versions of gcc - I wonder if the old qt lib is built with an older
> compiler?

No, my compiler is the stock gcc 3.2.2 shipped with Mdk 9.1...
I'm still stuck here. Even tried compiling my own ruby, but no luck.
I wonder if it's about pthreads or if it's the dlopen error that happen 
earlier that's the problem.

Is there anything non-standard in the way you require the extensions? Maybe 
the eval of "require qtruby.rb" is wreaking havoc? I'll try something here.
I've digged a bit in the Ruby programmer's guide but its slim and I didn't see 
anything relevant ;-/

Germain


More information about the Kde-bindings mailing list