[Kde-bindings] Re: AW: AW: [Kde-perl] PerlQt port for Qtopia / Zaurus?
Ashley Winters
jahqueel at yahoo.com
Sun Jan 26 08:49:30 UTC 2003
--- Adam Treat <manyoso at yahoo.com> wrote:
>
> We do the same thing with signal/slots (a bunch of proxy slots for
> each
> signature) and have been looking for a better way. The ideal
> solution for us
> would be a Connect method that took a function pointer as the slot.
> Do you
> know if TT is working on a introspective wrapper or some other tool
> for the
> bindings in Qt-4.x? If not then maybe we can ask in unison and see
> what they
> say ;)
Hrm... I just downloaded QSA, the Qt Scripting for Applications. It
adds support for receiving signals in JavaScript. Wanna guess how it
works?
function enabledChangedHandler( b )
{
debug( "state changed to: " + b );
}
function init()
{
var obj = new MyObject;
// connect a script function to the signal
connect( obj, "enabledChanged(bool)", this, "enabledChangedHandler"
);
obj.enabled = true;
debug( "obj is enabled: " + obj.enabled );
}
Here's the big question: How do they do it in the C++ code? Same way as
PerlQt. Even they don't bother with a pretty introspective wrapper
class. In fact, ALL of QSA is a big damned invasion of the QMeta*
hierarchy looking for properties, signals and slots. *grumble*
Ashley Winters
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
More information about the Kde-bindings
mailing list