Wrong tip for Mid() in Code Editor

The screen shot says all:

Sometimes, I am unsure of the syntax and I use the Tip feature of the Code Editor to check it. It was the case yesterday. I was sure the tip was missing something, but due to the stress, I checked in [LOCAL] and yes, the tip was missing the third arg.Drats !

It is not exactly wrong, as the mid() method can be used with only two arguments (it then goes to the end of the string). But it would be nice if the tip showed more then one of the possible uses. I use method overloading a lot and it can sometimes be confusing if the wrong type is shown. I once suggested it would’ve been better if the tip was shown in a balloon near the cursor (like other IDE’s do). Then there is plenty of space to show all possible versions, but it was not really possible to do in the Xojo IDE.

why not?

REALbasic.Mid(source As String, start As Integer[, length As Integer]) As String

<https://xojo.com/issue/28747>

[quote=145129:@shao sean]why not?

REALbasic.Mid(source As String, start As Integer[, length As Integer]) As String

Because that’s not the signature of the method. There are two signatures, and the IDE is showing you the first one, sorted alphabetically.

In my eyes the problem is that the IDE is displaying it as the only signature. Is there a way to indicate there is more than one syntax available at this point?

In the RB5 days there was a tips window that showed all the signatures. I miss that.

Now at the bottom, an indictor that more signatures exist than one could click on (or have a keyboard combination that does it) that shows a dialog with all signatures would be welcome

We did try that for a few beta builds a few releases ago
Folks hated it

[quote=145178:@Norman Palardy]We did try that for a few beta builds a few releases ago
Folks hated it[/quote]

I don’t remember that… but as I posted above, an indicator that shows more signatures exist with a quick way to display (and dismiss) them all when they do exist, would not have that issue. Those that don’t want to see all signatures would not have to, and this that did would have easy access.

A dialog might not be fancy enough these days but, it could get the job done simply.

  • karen

Would it not be possible to use the mouse wheel to show all signatures ?

When the cursor hovers the command it shows the first one, and the wheel goes through all the signatures available ?

[quote=145183:@Michel Bujardet]Would it not be possible to use the mouse wheel to show all signatures ?

When the cursor hovers the command it shows the first one, and the wheel goes through all the signatures available ?[/quote]

Thinking about it, sometimes the signature does not fit on a single line. Scrolling through signatures on the one line at the bottom would not solve that

So being able to call up a dialog where the whole thing can be displayed would be good, even if there is only one signature.

[quote=145178:@Norman Palardy]We did try that for a few beta builds a few releases ago
Folks hated it[/quote]
I can believe this. It must be exactly right (popup-speed, position, presentation, etc…) otherwise this can be very annoying. There are very few IDEs who got it right.

It was just to suggest an alternative, as the way it is now, it’s not ok either. Incomplete information is sometimes worse than no information at all.

I like Karens idea as a quick fix. It’s not fancy, but it does give you the right info.

I understand that there are two signatures, but that is the way it is shown in the language reference so why not just do the same thing in the IDE? At a quick glance you can see that there are two required parameters and one optional, but I do realize that Xojo is very much against making any changes to the IDE due to all the fun stuff that happens when changes are made (can’t blame them)…

Yes, there are so many changes to be done in the IDE…

Other than the tooltip for the Mid function, what else is there? :wink:

Where is the focus in the IDE when you quit a run ?
Just an example.

Right where Xojo says it should be - a random control…