DataEngine support for ScriptEngine

Aaron J. Seigo aseigo at kde.org
Tue Jan 22 17:01:04 CET 2008


On Tuesday 22 January 2008, Petri Damstén wrote:
> On Tuesday 22 January 2008 02:40:02 Aaron J. Seigo wrote:
> > the engine should always support applets. or rather, it doesn't need to
> > know.
>
> This was one think that I forgot to ask. Does every ScriptEngine have to
> support all the types? (I think not, ScriptEngine could just find another
> plugin with the same language that supports needed type)

agreed; this implies that we need to add some hints to the .desktop files.

> > 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?
>
> Yes runner, dataengine and applet should propably use same kind of api.
> What I like in returning actual DataEngine is that you don't have to
> duplicate every virtual function in ScriptEngine and it needs less
> modification to DataEngine class itself (keeps it simpler). Also I can't
> see what problems there could be with some language bindings?

one of the things i wanted to avoid was forcing people to create subclasses in 
javascript, for instance. it keeps a nice, well-defined "what should be 
supported" API as well.

as for modifying DataEngine, it's trivial. duplicating every virtual function 
in ScriptEngine ... well, we're talking about three methods here =)

-- 
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/20080122/7245d0c6/attachment.pgp 


More information about the Panel-devel mailing list