There are new commands for specifying the jython GUI. It's been effective to have the "getParam" method for controlling a script's parameters, and this should be extended to the title and other script branding. Right now one can use comments like "#TITLE: My Script Title", but this means the code needed to grab the parameters is different than the branding code, even though the actions are basically the same.
So there will be:
setScriptTitle -- a one-line title for the script
setScriptIcon -- an image for an icon
setScriptLabel -- a short label for menus
setScriptDescription -- long description
These will be used to create the GUI and add an icon.
Also, I'll finally add support for Jython booleans. Right now ['T','F'] implies a checkbox should be used for the GUI. This is a little awkward because when the variable is tested, you'll have code like "if filt=='T':" instead of "if filt:". So the new logic will be to check for allowed values of [ 0,1 ] will imply that the integer is intended to be a boolean.
I can't find the ticket for this, and maybe it was never started.
Later in the day that I started this I had a case where I needed either 0 or 1 for an interger, not a boolean. So maybe the constraints structure should hint that it is or isn't a boolean control. For example,
Also I noticed that the web-applification of a script requires that the values be false by default. See
https://jfaden.net/AutoplotServlet/ScriptGUIServlet?xlog=on&ylog=on&script=https%3A%2F%2Fgithub.com%2Fautoplot%2Fdev%2Fblob%2Fmaster%2Fdemos%2F2019%2F20191216%2FdemoLogFit.jy
Last edit: Jeremy Faden 2019-12-19
I've finished off treating 0 and 1 as a boolean control. If this proves to be a problem, I can see if I can peek at the code looking for True and False.
When running a script from the command line, --help after the --script should report the documentation for the script.
The Java GUIs now show title and description.
See also https://sourceforge.net/p/autoplot/feature-requests/360/ which talks about constraints for parameters.
There's a bug where the setScriptLabel is not used to label the action when added to the Tools menu. See https://github.com/autoplot/dev/blob/master/rfe/sf/704/bugToolsMenuLabel.jy
The new Jython boolean logic is affecting the RadioJove script which has a parameter "antenna" which is either 0 or 1. This shows up as a checkbox rather than a droplist now. I think the logic should fixed using:
getParam( 'antenna', 0, 'antenna number', { values:[0,1], labels['0','1'] } )
but it would also be interesting to see if the code could be inspected to resolve the ambiguity, looking for "True" and "False" use.
It would be nice if links found in the description could be clicked, so that longer explainations are available.
If any link is found, it is clickable.