DataEngine support for ScriptEngine

Aaron J. Seigo aseigo at kde.org
Tue Jan 22 01:40:02 CET 2008


On Monday 21 January 2008, Petri Damstén wrote:
> It was discussed earlier that DataEngine (and runner) support could be
> added to ScriptEngine in KDE4.1. 

well, the other way around runner (and maybe dataengien) support ;) but since 
you've done the dataengine stuff first, let's go for it.

> Still to do are (at least) runner support, commenting,
> error handling when engine does not support applets. But before I do

the engine should always support applets. or rather, it doesn't need to know.

> further coding I would like to ask if this is the way to go?

basically.

however, there are differences introduced here as to how Applets and 
DataEngines are handled. with Applets, we create an Applet container and the 
Applet holds onto the ScriptEngine* and forwards requests into it.

for Applets, that's paintInterface. obviously at this point ScriptEngine is 
pretty Applet-centric. i'll work the API out just now so it's a bit 
clearer .. 

in any case, the question then becomes, do we want DataEngine to do the same? 
i think the answer is "yes". exporting an actual DataEngine* from the 
ScriptEngine is likely to not work nicely with all possible language 
bindings.

so the forwardable API from DataEngine includes:

init
sourceRequsted
updateSource

i think that's manageable, and we should consider doing this the same way in 
DataEngine as in Applet. what are your thoughts?

additionally, i'm wondering if it would make sense to have  
ScriptEngine::Applet, ScriptEngine::DataEngine and ScriptEngine::Runner inner 
classes, each one containing the API for each set of functionality. should 
make managing things a bit easier. i'll investigate this with Applet 
tonight....

-- 
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/20080121/52fcf0fc/attachment.pgp 


More information about the Panel-devel mailing list