Menu

#704 Jython GUI improvements to automatic GUI controls and branding

open
nobody
None
5
2021-12-18
2019-12-17
No

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.

Discussion

  • Jeremy Faden

    Jeremy Faden - 2020-01-07

    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.

     
  • Jeremy Faden

    Jeremy Faden - 2020-01-08

    When running a script from the command line, --help after the --script should report the documentation for the script.

     
  • Jeremy Faden

    Jeremy Faden - 2020-01-10

    The Java GUIs now show title and description.

     
  • Jeremy Faden

    Jeremy Faden - 2020-01-13

    See also https://sourceforge.net/p/autoplot/feature-requests/360/ which talks about constraints for parameters.

     
  • Jeremy Faden

    Jeremy Faden - 2020-02-21

    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.

     
  • Jeremy Faden

    Jeremy Faden - 2020-03-03

    It would be nice if links found in the description could be clicked, so that longer explainations are available.

     
  • Jeremy Faden

    Jeremy Faden - 2020-10-31
    • summary: Jython GUI improvements --> Jython GUI improvements to automatic GUI controls and branding
     
  • Jeremy Faden

    Jeremy Faden - 2021-12-18

    If any link is found, it is clickable.

     
MongoDB Logo MongoDB