RFC: scripting support changes
Petri Damstén
petri.damsten at dnainternet.net
Wed Jan 23 10:51:42 CET 2008
On Wednesday 23 January 2008 11:22:57 Aaron J. Seigo wrote:
> it would be nicer if they simply weren't advertised in that case.
>
> > e.g. Kross python library might not be installed so ScriptEngine could
> > say 'oops I don't have python support'. Something like:
> > if (engine && engine->isValid()) {
> > so next offer could be tried.
>
> honestly, i'd hoped to rely on sane package management and dependencies for
> this. i take it kross only provides run-time language support resolution?
Yes, this could be left to the package management to decide. I'm pretty new to
kross but at least in runtime you can get supported languages by
Kross::Manager::self().interpreters().
> i'd hoped to avoid that as well. is there any particular reason that a
> seperate ScriptEngine plugin per language couldn't be provided, even if
> they have a common underpinning and live in the same library?
Yes some empty classes that just pass language to main class is easy to do.
> we could pass
> the language in via the QStringList args, but i really dislike relying on
> that as it requires assuming the order of arguments on the other side.
Also getting the language from script file extension is one option.
On the other hand some kind of runtime language query would be nice since if
new language is added to kross you would not have to do any modifications to
scriptengine to get support for that...
Petri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080123/d8850785/attachment.pgp
More information about the Panel-devel
mailing list