Super helpful to have inline tooltip generation

It would be super awesome to have a syntax that auto-generated tooltips for our own functions.

The first attached image shows the kind of thing I’m talking about, in its current form: the existing tooltip features for built-in Codea functions.

The second image shows a possible syntax for implementing our own tooltips, which would then display whenever those functions were called.

The line beginning - - ** has the hint text that shows after a function call.

The line beginning - - // has the variable names that appear in the bubbles over the parameters in a function call.

Is would be so helpful when using other people’s code, and often even in using our own.

Why wouldn’t the variable names in the function definitions be just fine?

@RonJeffries if that could work it would be a fine second-best.

But comments have much looser syntax requirements, for instance you could have a tooltip “Top Bun” instead of “topBun”, or you could use reserved words like “vec3” to signify what type a variable should be, or you could use special characters like “Date & Time”.

I doubt that many [any?] Codea users are disciplined enough to keep comments and code in sync, and when they’re not in sync, the code is right, not the comment. I’d vote for using the code, or nothing.

[shakes fist at cloud, yells at kids on lawn}

seems like it would at least be helpful to anyone who wanted to use it, but personally i would rather a split view where i can look at two files at once, like ron said, for me personally i wouldn’t keep all the comments updated, i’d rather look at the functions

The variable names would help a lot and would benefit both attentive and inattentive coders alike, so I cede the point.

@skar your solution would be beneficial in many many ways but I don’t think in this one.

Part of the whole point of the tooltips is that it spares one having to look between different files, so you don’t have to hunt through your tabs every time you just want to use a function.

For me, the inline tips sometimes gets in the way. If there was a way to turn it off I would. I can see new users using the tips, but after awhile, they’re not needed. If I have trouble with a command, I’ll tap on it to highlight it, and select reference from the popup to get more info.

@dave1707 I can see how they become less useful with the default API commands once you use them enough.

But they would be extremely useful when, for instance, using function calls that are in another project that was included as a dependency.

Without tooltips, if you don’t remember the parameters for a function from a dependency, you have to close the current project, open the other one, find the tab with the function, close that project, open the first one back up, and then hope that you didn’t forget the function parameters in the process—in which case you’d have to do it all over again (as has happened to me more than once).

@UberGoober - aaah, know what you mean about flipping between projects several times as your memory fails you. Bad news — it gets worse!!!

I honestly like this idea. I frequently have to switch projects or do a search for the function to see what parameters it needs. It would also encourage documenting your code.

I’d like to have the little pop ups, and I’d like them to pop up the names of the parameters as shown in the function. If they also supported a separate comment form, that would be OK by me, I just wouldn’t use it.

Ability to get back to a tab after a find of something elsewhere would be my favorite thing tho.

We are looking into multi-window code editing in 4, so it’d be possible for dependencies to be quickly switched between without as much hassle as you currently have

@John OK and it sounds like a lot of people want that, but it’s still far slower than tooltips.

Even with some multi-window UI, you still have to go find the darn thing you’re trying to use, which means hunting through projects and tabs, and that interrupts concentration significantly no matter how easy it is.

Automatic tooltips present virtually no interruption to concentration at all, making it much easier to stay in the “flow”, if you’ll forgive me for using that corny phrase.

@UberGoober Agreed, especially as Codea’s search function sometimes takes a bit to open in large projects after opening them. Just having a small reminder like that would help a lot.

I’ve spoken to @Simeon about and he seems to think its doable