There’s something I find confusing when using the LUA scripts binding to actions/buttons
- I use the Windows/Scripting environment to create and register some new Action scripts
- I use the Edit/LUA Scripts/Script Manager to bind them to actions
- Everything works as expected (I’m launching the actions via OSC)
- I go back to the Windows/Scripting environment and change+save one of my actions
- If I run the action again, it’s still the old code being executed
- Clicking Edit in the Edit/LUA Scripts/Script Manager does show the old code (in a scratch buffer slot)
- To get it to work, I have to remove my action declaration and rebind it
I don’t expect to be doing this changes to the scripts code often but out of curiosity, is there a design reason behind this apparent disconnect ?
Cheers and happy holidays !
The script is compiled to bytecode.
The factory functions run, arguments passed to the factory are evaluated and the produced bytecode is saved with the session. The main motivation for this is compatibility.
An old session will use the script of the session, and not a potentially incompatible updated script from disk.
Thanks for the explanation Robin; makes sense
Or a broken one because you were still half way through making changes to it when you loaded a session that uses it. Very good.
It would be nice to have some kind of refresh-all-from-disk function/action. So a session could be updated to the latest version of all scripts it uses, auto-remembering where to find them and what parameter values were used when they were added last time. Would this be possible?
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.