• Login
Community
  • Login

Auto-Completion Is this Legal?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
35 Posts 3 Posters 9.8k 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.
  • P
    PeterJones @Lycan Thrope
    last edited by PeterJones Dec 21, 2021, 7:00 PM Dec 21, 2021, 6:59 PM

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

    that is much clearer.

    Thanks. Then I will submit my PR, and those changes will be in the next release of the usermanual, whenever that ends up being.

    Are the languages listed in the Preferences dialog box compiled into the program, .dll files, or are UDL’s able to get listed in and used in the Preferences for setting the options of the Languages?

    Only the compiled-in languages show up in the Preferences > Style Configurator box, with the UDL kept as separate as possible while still being usable. That was a design decision made a decade or more ago, and is part-and-parcel of the name “Notepad++” at this point.

    It would be safer than letting the users modify the language via the “Define your language” dialog, so as not to mess things up. :-)

    I disagree. The point of UDL is so that the User can Define things – it’s two thirds of the name of the feature, after all. That’s what Notepad++ prides itself on: being able to be configured and customized by the user.

    L 1 Reply Last reply Dec 21, 2021, 7:09 PM Reply Quote 3
    • L
      Lycan Thrope @PeterJones
      last edited by Dec 21, 2021, 7:09 PM

      @peterjones ,

      Thanks for the change.

      Thanks for the clarification of the Preferences inclusion. I suspected as much, but thought I better verify that.

      I agree with most of your point about the User defining, the problem is that if it was so easy for them to make one, they wouldn’t have been asking if there was one, and would have made it. After what you and I have been going through, I’d like to bullet-proof it so I’m not being asked “How do I undo what I did?” questions. :-)

      Thanks again, and Merry Christmas and Happy New Year if I don’t get back in here as I’m trying to madly finish the grunt work on the functions to get it done for the Holidays. :-)

      Lee

      1 Reply Last reply Reply Quote 2
      • P
        PeterJones @PeterJones
        last edited by Jan 4, 2022, 7:46 PM

        @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.

        L 1 Reply Last reply Jan 4, 2022, 9:01 PM Reply Quote 4
        • L
          Lycan Thrope @PeterJones
          last edited by Jan 4, 2022, 9:01 PM

          @peterjones ,

          Thanks, “crystal clear”. :)

          Lee

          L 1 Reply Last reply Jan 6, 2022, 7:30 PM Reply Quote 0
          • L
            Lycan Thrope @Lycan Thrope
            last edited by Jan 6, 2022, 7:30 PM

            @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

            P 1 Reply Last reply Jan 6, 2022, 8:03 PM Reply Quote 0
            • P
              PeterJones @Lycan Thrope
              last edited by Jan 6, 2022, 8:03 PM

              @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.

              L 1 Reply Last reply Jan 6, 2022, 8:14 PM Reply Quote 1
              • L
                Lycan Thrope @PeterJones
                last edited by Lycan Thrope Jan 6, 2022, 8:16 PM Jan 6, 2022, 8:14 PM

                @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

                L 1 Reply Last reply Jan 6, 2022, 8:22 PM Reply Quote 0
                • L
                  Lycan Thrope @Lycan Thrope
                  last edited by Jan 6, 2022, 8:22 PM

                  @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

                  P 1 Reply Last reply Jan 6, 2022, 8:27 PM Reply Quote 0
                  • P
                    PeterJones @Lycan Thrope
                    last edited by Jan 6, 2022, 8:27 PM

                    @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.)

                    L 1 Reply Last reply Jan 6, 2022, 8:40 PM Reply Quote 2
                    • L
                      Lycan Thrope @PeterJones
                      last edited by Jan 6, 2022, 8:40 PM

                      @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

                      L 1 Reply Last reply Jan 6, 2022, 8:44 PM Reply Quote 0
                      • L
                        Lycan Thrope @Lycan Thrope
                        last edited by Lycan Thrope Jan 6, 2022, 8:45 PM Jan 6, 2022, 8:44 PM

                        @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

                        L 1 Reply Last reply Jan 8, 2022, 1:58 AM Reply Quote 0
                        • L
                          Lycan Thrope @Lycan Thrope
                          last edited by Jan 8, 2022, 1:58 AM

                          @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

                          L 1 Reply Last reply Jan 8, 2022, 2:18 AM Reply Quote 0
                          • L
                            Lycan Thrope @Lycan Thrope
                            last edited by Jan 8, 2022, 2:18 AM

                            @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