Auto-Completion Is this Legal?
-
@lycan-thrope said in Auto-Completion Is this Legal?:
I guess having US English as my native language is a detriment for me in understanding how some of the documentation is written.
– from Settings > Preferences > Auto-CompletionThat seems pretty standard US English to [me](“Admittedly, my interpretation is biased”). But there is some ambiguity… probably because at the time that I wrote that about three years ago, I hadn’t ever actually done any of the customization of auto-completion, and I hadn’t experimented as fully with what those settings do.
Let’s compare what the three settings show when Perl is the active language, where
checkbox
andcheckbox_group
are defined as keyword names in the auto-completion file perl.xml, and I have the wordcheck
already typed in my document.radio box completion popup ⦿ Function completion
⦿ Word completion
⦿ Function and word completion
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.
-
https://npp-user-manual.org/docs/auto-completion/
The first paragraphs of the “Function completion” and “Word completion” sections of the main Auto-Completion page does clarify the differences…
However, I’ll still clarify that in the Auto-Completion Preferences description as well.
-
Does this make more sense in the Auto-Completion Preferences section?
-
Thanks, that is much clearer.
I apologize if you took my joke about English as a chide, it was actually an attempt at self-deprication.
I think the problem I was having is that the entire section of AutoCompletion explanation is encompassing many areas. The modifications, the dialog, the syntax, and it kind of got confusing for me, as I tend to be a meticulous reader having copy editing as a past practice. You wouldn’t know it from my typos, but that has more to do with fat fingers and little keys. :)
My assumption, was that the Autocomletion section was devoted to the modification aspect, and that misinterpretation is on me. I appreciate your time and patience with my learning your systems. One of the reasons you may see so many questions has to do with my communication background in that the only stupid question is the one not asked. Of that, I’m guilty as hell as I always try to strive to understand exactly what is said or written, versus what I thought was said or written. Now, if only I could get my wife to understand that, we’d have less disagreements. :-)
Thanks again, and I’m glad that with your help, I’m finding my way through this stuff to be able to get something useful out of the efforts for the my community as well as yours, those that know and use dBASE are fans of the editor, so it stands to reason someone should have taken the time to get this together.
I do have one question, on the tip of my to-ask list, and that is:
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? It would be safer than letting the users modify the language via the “Define your language” dialog, so as not to mess things up. :-)
Lee
-
@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.
-
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
-
@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-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
-
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.
-
@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 supply
meaning, there were a lot of them in those multiple overload, parameter and entries.Thanks for what insight you could provide.
Lee
-
@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
-
@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:
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.)
-
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-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. :-)Lee
-
@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-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