[Qt-interest] Fwd: Re: Problems calling methods from QtScript
Wilhelm
wilhelm.meier at fh-kl.de
Tue Feb 22 12:08:22 CET 2011
Am 22.02.2011 11:43, schrieb Sean Harmer:
> Oops I sent privately by mistake. Here's a copy for the list...
Ok, thanks.
The documentation states clearly that one can't wrap methods!
So, if I read the stuff correct and
if I want to have the desired behaviour, I have to do the following:
1) write a wrapper-function foo() and add this with
QScriptEngine::newFunction() to the exposed object.
2) in this wrapper-function check the arguments (type, number, ...) and
call the original objects methods appropriate and leave all unhandled
cases to run-time exceptions
Correct?
This seems to be very clumpsy and it is surely due the object-based
nature of QtScript.
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
--
Wilhelm
More information about the Qt-interest-old
mailing list