LotusScript Popup Helper thing

How do you stop the code suggestions in Domino designer? When I type “Dim b as” it will automatically give me suggestions. These are a pain in the behind!

I’ve left them for 4 months now thinking that maybe they would be of some use, but they are of no use and cause all sorts of problems, like some strange delay when typing that seems to move my cursor 1 character sometimes and prohibit the use or tab or enter until I click out of them.

Thanks

Subject: Re: LotusScript Popup Helper thing

Welcome to the new world…

Subject: I have forwarded this question to Development

mL

Subject: have you set this preference?

for the Eclipse based LS editors, the settings in “Code Assistance” control the popup help. You can adjust the timing, or control whether or not you see it at all for LS keywords like Sub, etc.

It would be good to add a preference to completely turn it off, but setting the timeout to 9999 does delay it for most practical purposes.

Subject: Like this?

This only prevents the annoyance until ten seconds has elapsed, it does not prevent it entirely. Also, CTRL+Space does not cause completion to appear before ten seconds is up, so the once in a blue moon it’s desired one has to wait ten seconds for it to appear.

Just to be maximally annoying, while performing the actions necessary to test this, DDE has somehow decided I want nothing but help, so it continually pops a “tool tip” describing the part of DDE I’ve clicked on, no matter what I do. I had to use right-click on the task bar to close it, because it wouldn’t even X out.

Actually, relaunching Notes had no effect. The instant I load DDE, it’s still messed up.

Rebooting the VM makes no difference. DDE has been rendering utterly useless. Nice.

It was the “help” tab. Close that and it’s fine as frog hair. I still say the new “help” is a waste of life.

Subject: Now that’s odd…

“Also, CTRL+Space does not cause completion to appear before ten seconds is up, so the once in a blue moon it’s desired one has to wait ten seconds for it to appear.”

CTRL+Space works for me in the Eclipse LotusScript editor without having to wait the 10 seconds. On the legacy LotusScript editor, however, it does make you wait. but the keystroke there (after the wait) is CTRL+ALT+T.

Subject: Because today is a different day, it works…

  • Yesterday nothing would get code completion to appear in a LotusScript library using the Eclipse editor. Period.

  • Today it not only pops completion when CTRL+Space is pressed, but it pops it again (on the highlighted element in the completion box) after the ten seconds has elapsed. And just to be as consistent as possible it is not stealing focus, which I have seen it do before. In fact it’s working precisely as Willy originally described, across the board.

So if I could only set the timeout to infinity I’d be golden. In LotusScript. For today…

Subject: David, you need to get into the 8.5.2 Beta.

I haven’t had a chance to kick the tires with the 8.5.2 Beta DDE yet, but it’s quite possibly better than 8.5.1FP1/FP2 DDE.

If there’s one thing I’m scared of not getting enough love, it’s DDE.

Subject: This beta would be perfectly fine with me…

  • But I don’t have spare capacity to run both a R8.5.1FPx and a R8.5.2 server. When I went from R8.5 to R8.5.1 I was forced to update the server because of extremely serious changes for a minor point release that destroyed backward compatibility, primarily a total restructuring of the event handlers for XPages. If R8.5.2 does a similar destruction of compatibility, such that it will not work with a R8.5.1FPx server, then I cannot participate in said beta.

  • Otherwise anyone at Lotus should feel free to contact me at my profile address to pull me into said beta. I can easily whip up a VM to run just the client and continue doing development with that VM (just like I’m doing with a VM now), which should be a pretty good test given the complexity of this application.

  • I am pretty sure I can not run a client and a server VM at once. I could attempt to run a server on Linux (FC12), however, or even run both a client and a server on Linux, if that’s a desirable scenario, and simply run the client over the network using X. I just can’t run all that on this machine that I normally use for work. Poor little guy’s working like a one-armed paper hanger already.

  • Sure wish the darned admin would setup the darned BP Forum. Probably make this whole process a lot simpler.

Thanks for the suggestion, Erik!..

Subject: It’s called Auto Completion

Search for “auto completion” in the Designer help. You should find what you’re looking for.

I can’t see why you would want to turn off one of the few useful function of the Designer. Type a few letters of the object you want, press Enter, and it’s in. Don’t want to select anything…just press ESC. If you type at a regular pace after the "as " then the auto complete doesn’t pop up. Most of the time, it does exactly what’s needed.

Subject: Because it’s a PITA?

  • Not everyone likes being forced to press ESC in the middle of typing because some goofy pop-up keeps shoving itself in their face (and stealing focus) all the time. Not everyone likes that just because their mouse cursor happens to be sitting on top of an object variable that some ignorant window jumps open and hides the very code they’re in the middle of reading.

  • Designer “help” is an utter waste of life. Bill is correct in saying “Welcome to the new world.”. IT IS IMPOSSIBLE to turn off this inane “functionality”. I know there are boxes and radio buttons and such in Preferences. It’s possible I’ve changed them all and found that, like DDE itself, their implementation is more than a little erratic. For instance, Java won’t shove this in my face when I tell it not to. LotusScript always shoves it in my face no matter what I do. JavaScript does not IF I’m editing a script library or code in the Source tab. JavaScript does IF I’m using that ludicrous “script editor”, no matter what settings are in effect.

  • I know for a fact some people love this things. Good for them! I’m ecstatic that they have what they want. I also know for a fact some people hate them. It’s not appropriate to put in settings to disable this annoyance, then have it continually appear regardless of the settings…

Subject: oy vey…

I NEVER have to press escape to clear the auto-complete dialog. That’s only something that people who don’t know WTF they’re doing have to do. Auto-completion is a type ahead system…you just keep typing and it selects the object/method/property that you want. When you see what you want highlighted you just press enter.

And what if you’re typing something else? Then just keep on typing! When you reach the end of what you’re typing press space or enter and the auto-complete goes away. You never have to stop and press escape. Jeez…it sounds like you guys are acting like a deer in headlights when that box pops up.

As for the “waste of life” help…the only life being wasted is yours by not reading it. It tells you EXACTLY how to disable the auto-completion.

Edit some script. In the script window, right-click and select Programmer’s Pane Properties. Next, click on the Auto Completion tab (last tab.) Uncheck the two checkboxes and you’ve disabled Auto Completion. So simple it can be done by anyone (who reads the help, that is.)

Subject: oy vey indeed.

  • One doesn’t need to press ESC only if they like that completion trash on the screen. Obviously you don’t mind it, Willy, but I would neversay you don’t know WTF you’re doing. That’s a bit personal. I would say exactly as I did say: I’m happy those who like it have what they want. I am not happy that DDE ignores existent preference settings.

  • I have read “help”. Numerous times. Do you honestly think I’m calling it a waste of life without so much as looking at it? Probably you do, since in your opinion I don’t know WFT I’m doing. Perhaps you should try reading where I said explicitly that I have done what “help” says, that DDE randomly pays attention to those settings, and gave examples for when it does and does not work.

  • You are quite obviously using the legacy editor, by your “instructions”. I am not. The Eclipse editors are utterly and completely different from any legacy editor.

Try assuming others do not do as Willy does, and perhaps they do know WTF they are doing, before insulting them…

Subject: Okay…

I apologize for my strongly worded comments, but I also felt insulted, having had the help system (that I use constantly, and that I recommended be used in the previous post) referred to as a “waste of life”…it’s the same as saying my advice is worthless. When I wrote my comment I wasn’t directing it toward you personally (was towards “people”) but (obvious now) through association, as I had previously done, I can see you taking it that way.

I guess I’m also a bit testy after having spent weeks interviewing so-call Lotus Notes experts with more than 10 years experience claiming to be LotusScript experts and not realizing what they were actually doing when writing Dim a, b, c as Long. But the help tells you exactly what happens when you do this, and so many other things. The help system is as important a tool as the language itself, so I consider anyone who doesn’t know how to use it to be lacking (as all the “experts” so aptly demonstrated.)

The original post was on LotusScript, and I get the Eclipse editor only on agents and script libraries. All the traditional design elements are using the old editor. So my advice was correct…just incomplete.

To get the LotusScript code suggestions to stop in Eclipse, simply right-click in the editor window, select Preferences, and set “Content assist auto activation delay” to 9999. Now you have 10 seconds to decide what to do after typing "as ". You can always press CTRL + Space to display the content assist.

Subject: Help, experts, and completion…

  • I understand, Willy, I’ve been known to be a bit strong with my own words. I’d like to say otherwise, but there it is. As Kosh says on B5, “The truth points to itself.” I also use help constantly, and I am constantly amazed at how less useful the DDE incarnation of “help” is compared to R-prior’s Notes Database version of help. The Notes Database has significantly more useable information and cross-reference links on its entries than any entry does concerning XPages. Perhaps you are referring to the old database version of help? I agree that is not even close to a waste of life to employ. Lotus should have never moved away from that. The M$-esque browser-based “help” is a waste of life, using the database help as the only measure, far as I’m concerned.

  • On a whim I looked up Dim in the M$-esque browser-based thing, and I see no explicit indication of what Dim a, b, c as Long does. Not explicit. What I see implies a & b will be Variant and c will be Long, but I’ve been using help long enough to know what it implies and what happens are often not congruent.

    But I have never done this, and never would do it. Legibility is as import to coding as what the code says, within the constraint that I’m lazy and don’t want to type variable names like iterateOverDocumentCollection. One variable to a line and a comment is that compromise, for me:

Dim ndx as Long ’ Iterate over doc collection

  • I have in fact done exactly as you suggest … set the timeout the maximum value, but that only works for LotusScript. JavaScript editing randomly ignores completion settings entirely, and one can’t do XPages without coding JavaScript, so sometimes it properly doesn’t appear (as configured), and sometimes it appears after the default 200ms “delay”, and it’s about infuriating after the zillionth time. I’d be delighted to have a DDE-wide setting that applied to every single editor in existence that would make it never pop completion or a tool tip until I press CTRL+Space. That’s exactly how it should work, if configured that way, then you and I would both be happy.

  • I have a PMR in on this that the “support” person has let languish for some time now. This gives me the impression Lotus doesn’t care that settings are ignored, but it could simply be that one person. They are Lotus, as far as that PMR is concerned…

Subject: on help…

I haven’t been coding much in 8.5.1 because it sucks, but when I do I use the HTML help. From my point of view, it’s nearly the same as the db help because I never search or use the index. I always go to the contents, and with the HTML help it simply added another click when I start looking for something.

And there’s also the fact that I’m not coding in JavaScript or X-Pages (what’s that? :wink: so I haven’t had the opportunity to experience the issues you’re having. The HTML help for LotusScript is exactly the same as the DB version, so I’m not missing anything (didn’t gain anything, though…)

As for Dim, look under…

Lotus Domino Designer Basic User Guide and Reference

LotusScript Language

Data Types, constants, and Variables

Declaring scalar variables explicitly

"It’s important to explicitly declare all variables. For example:

DIM X, Y AS INTEGER

results in Y being data-typed as INTEGER but X as Variant. The correct syntax is:

DIM X AS INTEGER, Y AS INTEGER"

Here’s another one that drives me nuts when I see it…

Set doc = db.GetDocumentByUNID( someunid )

If doc is nothing then…

But you’ll never get nothing. The help says that an error is raised instead.

“Not matching the UNID to a document in the database raises lsERR_NOTES_BAD_UNID (4091).”

And I also see…

returncode = agent.RunOnServer

If Not returncode then

execute-something-when-returncode-is-0

…thinking that the code will only execute when the result is 0 (no error.) But the code executes when returncode is non-zero as well, because “Not” is not a boolean reverser…it’s a negation operator. As explained in the help, It takes what you give it, changes the sign, and subtracts 1. So a returncode of 0 become -1 (taken as true) but a returncode of 23 becomes -24 (also taken as true.) I had to correct something along these lines just a few weeks ago, coded by hired help.

Both of these cases also raise another issue of people not testing every branch of their code…but that’s a different rant altogether!