I am fiddeling around with API v4.
On startup of my scripts gui, I’d like to display a textfield with the content of renoise.song().selected_sample.name .
If I start the script with an empty instrument, where no sample exists, the variable renoise.song().selected_sample is nil of course, so the script fails.
Does anyone have a good idea how I could catch that exception?
I’d prefer to run a kind of initializer beforehand, but I did not come up with a nice solution.
Kind regards, Chris
Mmm, what about two textfields inside an if clause? One for startup, one for later?
Well, I found a solution using global variables,… I am new to lua, well, well