[KDE Dot News]
 faq
 flatforty
 contribute
 subscribe
 configure
 search
 rdf

 main
 parent
 thread


Re: Javascript?
by Richard Moore on Thursday 27/Sep/2001, @10:17
It's certainly true that embedding KJS (Konq's javascript engine) is easy - I wrote some code last week which embeds it, and it only took an hour. I've since added a bridge that lets the scripts access the properties of any QObject (like the Qt-DCOP bridge). It would even be easy enough to write a plugin that uses this stuff (I already made a KPart) and this lets it extend existing apps thanks to KParts.

There are plenty of other decent script engines and embedding perl or python is no harder than javascript, and people want to use these too. The big advantage of using DCOP for scripting, is that you can use any language you want to (or even mix several languages). In addition, the Qt-DCOP bridge lets you access the the interfaces of objects that the developer did not specifically expose for scripts.

Rich.
  Related Links
 ·   Articles on Developer
 ·   Also by Richard Moore
 ·   Contact author

Thread Threshold:

The Fine Print: The following comments are owned by whomever posted them.
( Reply )

Re: Javascript?
by Simon Edwards on Thursday 27/Sep/2001, @11:58
You wouldn't even have to embed it per se. You could just put the JS interpretter in an external prog and have programs start it themselves and also pass the name of the script to run and maybe the name of the calling program (for convinenence). By keeping stuff out of process mem you could have as many different interpretters as you wanted, but without any extra library/startup overhead.

--
Simon
[ Reply To This | View ]
  • Re: Javascript?
    by Richard Moore on Thursday 27/Sep/2001, @12:29
    There are advantages and disadvantages to both approaches, the nice thing is we have the choice (and you can even use both in the same app).

    Rich.
    [ Reply To This | View ]
How about recording?
by Oliver Stieber on Tuesday 02/Nov/2004, @05:38
Did you notice if it would be easy to get all the dcop events to be sent to another application/object so that they could be recorded.
This would be great for scripting and producing 'tutorials' for applications instead of just the plain old docbook help.
[ Reply To This | View ]
The Fine Print: The previous comments are owned by whomever posted them.
( Reply )

  "I think I might be the only developer who does not use XEmacs." -- Jono Bacon
KDE®, "K Desktop Environment", "KDE Dot News", "got the dot?" and the KDE Logo® are trademarks or registered trademarks of KDE e.V. in the European Union, the United States and other countries. All other trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster. The rest: Copyright © 2000-2008 KDE e.V. for The KDE Project. For further information or comments on this site, please contact the Webmaster.
[ home | post article | flat forty | subscribe | search | rdf ]