jean-emmanuel / open-stage-control

Libre and modular OSC / MIDI controller
https://openstagecontrol.ammd.net
GNU General Public License v3.0
714 stars 90 forks source link

[Feature] assist user with VAR syntax #725

Closed GeneralMidi closed 3 years ago

GeneralMidi commented 3 years ago

I find myself forgetting the syntaxes often. Yes, I should learn them. But perhaps, if quotes are useless in VAR{} blocks (as in you would never ever need to put quotes for the property name), perhaps you could make life a tiny bit easier for the user and they could be removed upon hitting enter? This already exists when entering digits in a numeric field in quotes, they are automatically removed (e.g. entering '2' in gridTemplate removed the quotes)

image

Maybe also here, if quotes are this time necessary, perhaps it might be an idea to put them in if we forget? We should probably just learn correct syntax...but it's an idea.

image

jean-emmanuel commented 3 years ago

I'm pushing a commit to simply ignore quotes around the name in the VAR syntax.

Maybe also here, if quotes are this time necessary, perhaps it might be an idea to put them in if we forget? We should probably just learn correct syntax...but it's an idea.

Correcting code syntax on the fly is way too complex, learning the syntax and checking the console for syntax errors is the way.