Community
    • Login

    Auto-Completion Is this Legal?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    35 Posts 3 Posters 9.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • PeterJonesP
      PeterJones @PeterJones
      last edited by

      @peterjones said in Auto-Completion Is this Legal?:

      I will add it to my TODO list to clarify the description in the usermanual to make it more clear what “word” vs “function” is.

      The updated User Manual has been released, and now https://npp-user-manual.org/docs/preferences/#auto-completion does a better job of clarifying “word” vs “function” in those preferences.

      Lycan ThropeL 1 Reply Last reply Reply Quote 4
      • Lycan ThropeL
        Lycan Thrope @PeterJones
        last edited by

        @peterjones ,

        Thanks, “crystal clear”. :)

        Lee

        Lycan ThropeL 1 Reply Last reply Reply Quote 0
        • Lycan ThropeL
          Lycan Thrope @Lycan Thrope
          last edited by

          @lycan-thrope
          Peter, et al,

          According to the documentation:
          For any given function, all text, plus 2 bytes per parameter, plus 24 bytes if 2 overloads or more, can’t spill over 2,043 bytes. Remember that a byte is a byte, so formatting whitespace competes with actual text.
          I should be limited to that size for an entire function with overloads. However, prior to trimming it for size per the recommentations, I was functional with a size of well over 2200 characters. This happened because I changed the hard code <> characters to the escaped versions, thereby increasing each angle brackets character count from 1 to at least 4 characters per angle bracket, unless the escaped characters aren’t counted going into the parser.

          Is that the case? A couple of large functions I had checked while doing the building of the hints for functions, so I know when I did it, it was within those character(byte) counts. While compiling the different modules into the final file I noticed it looked a bit larger, and checked the size via a character count website…where it reported that, the working in NPP function size was more than the limit.

          Has the size been increased, or does the parser just not count the extra characters needed to escape the angle brackets?

          Lee

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Lycan Thrope
            last edited by

            @lycan-thrope ,

            That’s getting deep into implementation details. If the 2200 character version worked for you, it is likely that the &-entities are converted to real characters before the byte-limit is hit, but I cannot guarantee it.

            Someone who is pushing up against that limit would be well-advised to be wary, and see if there is any way to trim down the text – and maybe even seek out the source code for that portion, and see what order events occur, and exactly when the character limit is hit.

            Lycan ThropeL 1 Reply Last reply Reply Quote 1
            • Lycan ThropeL
              Lycan Thrope @PeterJones
              last edited by Lycan Thrope

              @peterjones said in Auto-Completion Is this Legal?:

              That’s getting deep into implementation details. If the 2200 character version worked for you, it is likely that the &-entities are converted to real characters before the byte-limit is hit, but I cannot guarantee it.

              Okay, this make sense in hindsight, but as your next point makes…

              Someone who is pushing up against that limit would be well-advised to be wary, and see if there is any way to trim down the text – and maybe even seek out the source code for that portion, and see what order events occur, and exactly when the character limit is hit.

              I was testing it, that’s how I knew I was within limits before I did the conversion to escaped characters, per your recommendation. I did it, even though it worked, on the off-chance that future parsers change their behavior with regards letting that character survive in quotes, and hence the increased size is what caught my attention. The stock dBASE syntax notation use of angle brackets Indicates an argument that you must supplymeaning, there were a lot of them in those multiple overload, parameter and entries.

              Thanks for what insight you could provide.

              Lee

              Lycan ThropeL 1 Reply Last reply Reply Quote 0
              • Lycan ThropeL
                Lycan Thrope @Lycan Thrope
                last edited by

                @lycan-thrope
                As a note, if anyone else has need for it, I used this character count website to check it out, so it was open in the tab next to the NPP documentation while writing them so I could check the count supplied against the count I could have. : -)

                Lee

                PeterJonesP 1 Reply Last reply Reply Quote 0
                • PeterJonesP
                  PeterJones @Lycan Thrope
                  last edited by

                  @lycan-thrope said in Auto-Completion Is this Legal?:

                  I used this character count website to check it out,

                  Any reason you didn’t just use Notepad++ status bar? It shows the size of any single-region selection:
                  58dd85e2-bc75-496b-96b0-315e73a5c76c-image.png

                  And if you were trying to get the data on multiple text entries in the same function, you would have had to copy them from their attribute locations into the website, so why not just copy them into a new tab in Notepad++? (And a new tab makes it even easier, since it already gives the length of the whole tab.)

                  Lycan ThropeL 1 Reply Last reply Reply Quote 2
                  • Lycan ThropeL
                    Lycan Thrope @PeterJones
                    last edited by

                    @peterjones ,

                    Umm…because I didn’t know it did that? :-) I knew about the character count in the file, but had never noticed the ‘sel’ part…doh! Aside from that, I still had the manual open and could check when it gave me the count, since I don’t remember everything, I could check the manual. :-)

                    Thanks, btw.

                    Lee

                    Lycan ThropeL 1 Reply Last reply Reply Quote 0
                    • Lycan ThropeL
                      Lycan Thrope @Lycan Thrope
                      last edited by Lycan Thrope

                      @lycan-thrope
                      Incidentally, this is normally what I see, but I see now when I’ve selected something, it comes up. ::sigh:: so many options, not enough reading. :-)

                      ACStatusBar.PNG

                      Lee

                      Lycan ThropeL 1 Reply Last reply Reply Quote 0
                      • Lycan ThropeL
                        Lycan Thrope @Lycan Thrope
                        last edited by

                        @lycan-thrope
                        Peter, et al,
                        I’ve finished with the package for the moment. I’ve given it to our community on our newsgroup to try and work with, and I have a few other things I’d like to do, like include more keywords of stock classes, objects, properties, events, etc, and tighten up and improve the FunctionList parsing (remove the parens, from (this), and the larger names), and possible do a version for our older procedural version of dBASE, which actually is still being used in older programs and in other countries.

                        That said, the question becomes, since it’s not a .dll to be included in NPP proper, how does one get this setup (of three separate files, two named the same)to be used by anyone looking for a dBASE flavor for NPP, other than our newsgroups?

                        Lee

                        Lycan ThropeL 1 Reply Last reply Reply Quote 0
                        • Lycan ThropeL
                          Lycan Thrope @Lycan Thrope
                          last edited by

                          @lycan-thrope
                          To be clear, I have no idea how to use github, a pull request, etc. So I’m really novice in this area. As a note, the Autocompletion and functionList files (with the same name) seem to be the problem with just zipping up the files and since I have no way of knowing where users have their installations, my assumptions about 64 bit/32 bit/Standard install and stand alone install have all been pushed to the side as I tried to explain where to install the files, and am not sure what I would have to do to get a .zip version to do it automagically. I know, there’s a lot I don’t know…tell me something I don’t know. :-)

                          Lee

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          The Community of users of the Notepad++ text editor.
                          Powered by NodeBB | Contributors