Coming in 8.1.18: Script editor improvements

PSA to anyone stumbling on to this thread.

I've confirmed a bug with support introduced somewhere in 8.1 that will break find and replace if you use the word "Arguments" in your doc string (triple speech marks).
Apparently this clashes with the inbuild Ignition function documentation and confuses the parser.

So avoid using that like i did, and stick to the shorter version of "Args"... :smile: :upside_down_face:

Now to find all the places i've done it amongst hundreds of windows..

4 Likes

The good news is that it only affects Vision extension functions in particular. A bad choice when we first introduced their serialization that was basically unavoidable when extracting them back out again to upgrade, unfortunately.

3 Likes

Will it still be a problem if there is another def block inside the main extension function?
Like this for example?

No. Only a triple-double-quoted bare string, on the very first line, containing the literal string Arguments: will cause the issue. Break any of those conditions and you're fine.

1 Like

Docstrings per Google style
It will be amazing if you clould add a context menu on right click on function to generate this docstrings template !

8 Likes

Note: Any really big stuff will have to wait until after 8.3.0, so don't expect a lot on this topic for a while. But, a dependency bump in the bundled library did get a few little niceties I think you'll all appreciate; these will be in the nightly tomorrow and in 8.1.38 full:

  1. "Smart" quotes - single and double quotes will automatically surround the selection, and nicely 'overtype' at the end.
    Kapture 2024-01-24 at 10.27.53
  2. "Smart" square brackets and curly braces - much the same as quotes, for automatic surround of a given selection.
    Kapture 2024-01-24 at 10.29.06
  3. Proper automatic indentation. This one is something I had so baked into my brain I didn't even realize it was missing - I literally always do a colon -> newline -> tab automatically, so now I end up with two tabs when editing a script in the designer :laughing:
    Kapture 2024-01-24 at 10.33.55
  4. No flashy GIF, but I tweaked the paste handling a little bit to hopefully help address complaints like Copy-Pasting Script in Ignition 8.1.32 Results in Indent/Dedent Errors :crossed_fingers:
25 Likes

Yay!

This is awesome!

--runs to recommend upgrade solely for this function--

4 Likes

I actually did just that after reading the patch note !

2 Likes

I do this all the time in PyCharm because of this haha

Looking forward to upgrading! In a few years' time, knowing our end users :roll_eyes:

2 Likes

yes please! that looks mint