Problem
As a ROBLOX developer, it is currently not possible for me to take advantage of Studio’s constructor autocomplete. My desired workflow is:
- Type out
<constructor name>.new
- Look at some reference to see which arguments a constructor takes and which order they’re in
- Fill in the constructor
but ROBLOX stops me at the first bullet:
https://gfycat.com/AssuredChillyIndochinesetiger
I need to know how to fill out the constructor while filling it out, but the intellisense disappears immediately when I start filling out the constructor. This isn’t too bad with small/simple constructors like Vector3’s, but long/complicated constructors are impossible to memorize from glancing at the autocomplete. I end up just switching to my browser and opening up the wiki for a reference.
Benefits of Resolving
By resolving the issue, ROBLOX would improve my development experience by:
- Not interrupting my workflow by pulling me out of Studio and into my browser
- Cutting down on the time it takes to fill out long/complicated constructors
Potential Solution
I don’t think keeping up the prompt would ever be a good solution, as I may get sidetracked (e.g. if the constructor takes another ROBLOX type as a parameter, I would have to have two intellisense prompts open if I wanted to check the other type while keeping the reference open for the first type.
Some other IDEs I’ve used will allow developers to insert templates for constructors/methods. For instance, if I specify in the prompt somehow that I want a template to be inserted for TweenInfo, it would insert something like:
TweenInfo.new(int time, EasingStyle easingStyle, EasingDirection easingDirection, int numRepeats, bool reverses, number delayTime)
This is not proper syntax, so it would be flagged by the syntax checker and also error if the script was immediately run. I’m not sure if there’s a better solution, or if this is negligible since it’s intended that the developer change these arguments anyway.