[Kst] JS in Kst

George Staikos staikos at kde.org
Thu Dec 1 23:52:27 CET 2005


On Thursday 01 December 2005 17:36, Andrew Walker wrote:
> Is there a way to issue a command from the JS console?
> Say I have a plot called P2 and am too lazy to find it
> amongst all the other windows and plots. Can I do something
> like P2:close() from the JS console, or do I have to write
> and open a script to do this?

  It has to be Javascript.  There's no reason why we can't, eventually, 
provide a function like:
findPlot("P2")->close();  (assuming that "close()" was a valid plot function)

  But we won't ship anything like that in 1.2.  Each and every command, 
method, object or other element we provide in a release version is something 
we're stuck with forever, so they have to be carefully considered.  However, 
adding non-DOMish things is a big mistake IMHO.  We could make things that 
make DOM-style behavior quicker and easier to work with, but I really don't 
support changing the scripting paradigm.

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/


More information about the Kst mailing list