RFC: scripting support changes

Aaron J. Seigo aseigo at kde.org
Wed Jan 23 10:22:57 CET 2008


On Wednesday 23 January 2008, Petri Damstén wrote:
> On Wednesday 23 January 2008 02:28:25 Aaron J. Seigo wrote:
> > it builds and should in theory work ;) but before i go further i'd like
> > comments and an early peer review as the patch is already a bit large.
>
> This looks like components is not going anywhere?

a stray line from an earlier draft where ScriptEngine was instantiated and 
then used as a factory class. good catch; i've removed it now.

> Should ScriptEngine be able to cancel support for some language in runtime?

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?

i wonder if this couldn't be done in the library component loader instead, so 
that KService::createInstance would simply return 0 in that case. i'll have 
to look into what the macros expand out to to see how this might be done 
without too much pain or brittleness.

> Language does not go to the ScriptEngine. Some ScriptEngines could support
> more than one language and need to know it.

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? 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.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- 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/ea87869d/attachment.pgp 


More information about the Panel-devel mailing list