Kst needs a way for extensions to add commandline parameters, in particular so we can add a commandline parameter for scripts to be launched or JS to be evaluated. I have some concerns right now because getting this right is hard. For instance, it's not easy to know when it's 'safe' to execute a script on startup. Also we don't want this option appearing when the extension isn't loaded, but we don't want to hardcode parts of the extension into Kst.
Based on discussion on list, the UI should be: Parameters starting with --E are stored as a string, for use by extensions which decide they understand them.. (technically, we do this by pre-parsing argv before passing it off to KCmdLineArgs) eg: kst --Ejs "bolocheck.js -d data.dat -fd filter.dat -f0 1121 -N 20000" + keep checking of kst command line parameters + extension parameter name space is completely isolated ? can extensions report parse errors of their parameters? + third parties can add parameters for their extensions. - no promise that extensions won't introduce parameter name clashes between themselves (but if they only chose to recognise special cases, this should be OK) - the "" bracketed parameter names seem kind of funny.
On Monday 05 December 2005 18:33, netterfield@astro.utoronto.ca wrote: > eg: kst --Ejs "bolocheck.js -d data.dat -fd filter.dat -f0 1121 -N 20000" Instead of adding a complex command-line parser inside Kst, why don't we use something similar, but JS based: kst --Ejs "load(bolocheck.js); myBoloCheckScript(\"data.dat\", \"filter.dat\", 1121, 20000);"
The extension is responsible to interpret the string as it wishes. The suggested approach for --Ejs looks good.
Was already implemented -E "js:loadScript('foo.js')"
Change version to 1.x