Wish Error "Missing Parameter" mouse hint should show parameter list

Widget

Well-Known Member
Licensed User
Longtime User
When using the B4A editor I noticed if I am missing a parameter when calling a Sub, and I move the mouse over the line with the error, the Mouse Hint shows "Missing Parameter" (for built-in class method like "MyRect.Initialize") or ", expected" (for a regular Sub).

But it would be nice if it could also show on the next mouse hint line, the proper parameter list for the Sub (this is normally shown if there is no error). This eliminates the need for the user to go looking for the Sub definition which may be in another module.

So instead of the Mouse Over showing just "',' expected.", which doesn't tell me which parameters are missing or how many, this is what I'd like to see when the mouse is over the line with the error. (I doctored the image in case anyone is wondering how I got it to appear.o_O)
MouseHint_MissingParameter2.png





If this was a built-in class method like "MyRect.Initialize(0,0,0)", then I could press Ctrl-Space on the line of code to display the pop-up help, but Ctrl-Space unfortunately does not work for regular Subs or user defined class methods. (Why not? It would be great because we could see all available methods and properties if it were a user defined class.)

TIA
 

Widget

Well-Known Member
Licensed User
Longtime User
It does work for user subs.

I can't get it to display the tool tip (using B4A v6.80 on Win 7 64bit).

If I put the caret on "My|Sub" of "MySub("1")" and press Ctrl+Space, the caret moves to the start of the "(" but no tool tip is displayed.
If I hover the mouse over MySub1("1") which has a red wavy underline because it is missing a parameter, the hint is "',' expected". But it never gives me the tool tip for calling MySub1 when I press Ctrl+Space.

I've seen https://www.b4x.com/android/forum/threads/ide-tips.6546/#content.

TIA
 

Widget

Well-Known Member
Licensed User
Longtime User
It will never show for the current sub as you are modifying its signature.

It will show for other subs:

Yes but the definition is "MySub(a as Int, b as Int)" and the call to it is "MySub(1)". So the argument list to MySub is Incorrect (missing 2nd parameter) and Ctrl-Space will NOT display the correct parameter definition. I have to find the .bas file where MySub() is defined and open it in a new editor window, to see the correct parameter list . It would be nice if Ctrl-Space could do that when its on the invalid "MySub(1)" statement.
 
Top