5

New 3.6 Script Editor

Is there a way of turning off the auto-complete function in the new 3.6 script editor?  If I want 2x " (double-quotes) or a pair of braces () or {} then it assumes I always want a pair.  I don't! I might just be editing or entering a literal text string!  Fine when adding new script, but infuriating when editing an existing script or editing a literal text string. The new editor does not appear to have been tested in the 'real-world'.

7 replies

null
    • Ninox developper
    • Jacques_TUR
    • 1 yr ago
    • Reported - view

    In a normal code editor, if text is already attached to the cursor, then only one quote is inserted. For braces, only opening braces that have no text to their right cause the closing brace to be inserted.

    This description is a bit heavy, but just look at the behaviour in this example of CodeMirror : https://codemirror.net/demo/sublime.html

    Inverted commas, square brackets and braces are inserted twice or not depending on the text around the cursor. 

    It seems that the CodeMirror version that Ninox uses is 5.44.0, while the demo version that works better is 5.65.3.

    By the way, in version 5.45.0, the one that is just after the version that Ninox uses, we can see the following correction :

      • Paul_Chappell
      • 1 yr ago
      • Reported - view

      Jacques TUR I agree this is the way it should work. By not recognising existing text attached to the cursor the new Ninox version slows down the editing of any existing script and function.

    • Paul_Chappell
    • 1 yr ago
    • Reported - view

    This is so annoying.  If I am entering script and type 'Field Name' and then realise I made a mistake and need to change it to text('Field Name') (or number('Field Name'), etc) I don't want the editor to put text()'Field Name' as soon as I type text( .  Please sort this out!

    • Karen_Estrada
    • 1 yr ago
    • Reported - view

    Wow, I really HATE this -> Shadow coding!! If I wanted shadow coding I'd 'phone a friend'. 

    I entered a simple "If, then else" as I do frequently but today, I did the same   -- very basic - three/four lines and I continue to get an error (the line number turns red!! 
    If I don't add end (which before the system would just add them on for you, generally) and I just end with then null  the line number still goes red!  When I mouse over to see what it is .... it gives me a bunch of stuff that makes absolutely no sense (3 or 4 lines of different things,  .... like "expecting a symbol" when absolutely no symbol goes there) and all the rest of it has the correct "  " or ' ' !!!

    I double/triple checked to make sure what I had entered was correct and it is ... so now of course I can't save it and I'm stopped dead in my tracks regarding the database (which was supposed to be a basic, quickie thing).   So I don't understand how this is helpful??  I also don't like the auto-bracket thing but that's something at least I could live with.

    They have to provide the option to turn it off/on if wanted or not wanted. I personally don't want it .... I absolutely hate it. 

    Karen

      • Ninox developper
      • Jacques_TUR
      • 1 yr ago
      • Reported - view

      Karen Estrada Could you share your code to try and reproduce and fix the problem?

      • Karen_Estrada
      • 1 yr ago
      • Reported - view

      Jacques TUR Hi thanks so much. I went back and tried it again, tweaked it and it worked. Usually if I do a short "if, then, else" I'll enter it (see below, -- not a longer conditional though) and that's never been a problem although maybe it's not the best form....). But I went back and entered the code line by line and that seemed to make the Shadow Coder happy :-)

      (Display field only, if)

      The code I intially entered (and usually works) was 

      if 'Summary Block Style' = 1 or if 'Summary Block Style' = 3 then
              true
          else
              null
          end

      Then, I re-entered it as follows: 

      if 'Summary Block Style' = 1 then
          true
      else
          if 'Summary Block Style' = 3 then
              true
          else
              null
          end
      end

      ... so now I know :-)  

      Thanks again!! Karen

      • Ninox developper
      • Jacques_TUR
      • 1 yr ago
      • Reported - view

      Karen Estrada this code, without second « if » work fine :

      if 'Summary Block Style' = 1 or 'Summary Block Style' = 3 then
              true
          else
              null
          end

      If you put two « if », you must to put also two « then ». 

Content aside

  • 5 Likes
  • 1 yr agoLast active
  • 7Replies
  • 457Views
  • 3 Following