[Kst] JS in Kst

Barth Netterfield netterfield at physics.utoronto.ca
Fri Dec 2 00:11:10 CET 2005

I think Andrew was asking "what is the javascript syntax for closing a plot 
named "P2" from within the JS console (which should be the same as doing it 
from within a script).


On December 1, 2005 05:52 pm, George Staikos wrote:
> 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.

More information about the Kst mailing list