I was going to post this in the feedback forum but I can't seem to post there so I'm asking this here instead:
In the desktop editor, would it be possible group variables and scripts into a collapsible folder? It's a bit unwieldy in the current form, as I have a lot of globals going on. The app itself already has them grouped into a "Globals" in the settings, so some kind of similar organizational structure for desktop would be nice...
Global variables/scripts in the desktop editor
-
midikinetics
- Regular
- Posts: 66
- Joined: 15 May 2015 17:46
- Contact:
Re: Global variables/scripts in the desktop editor
You can use a Container widget and hide it.
1) Create a container widget by dragging it into the project
2) Create a script on it, set the execution mode to On Load and write the following to hide it in the UI:
3) Delete the script. It was only needed to hide it, and it will remain hidden until you call `show` with a 1 as the second argument.
Keep in mind that this will create a namespace. Your existing scripts will now have to call Object.Container.function().
I do this all the time to group functions together into namespaces. In fact I consider this best practice.
1) Create a container widget by dragging it into the project
2) Create a script on it, set the execution mode to On Load and write the following to hide it in the UI:
Code: Select all
show(getobject(), 0); // hides the container
Code: Select all
show(getobject(), 1); // shows the container
I do this all the time to group functions together into namespaces. In fact I consider this best practice.
Code: Select all
GraphicsHelpers.resetAllGraphics();
MixerHelpers.resetAllFaders();
SongHelpers.loadSong(1);