-
Splitting long script
Hello friends,
Im looking for a solution to organize my extreme long script. I was thinking to split the some functions to separate files and load then load them through #include in the main script.
The splited files should include: UI, clickEvent and different functions.
I came to this solution what actually works, but im not sure if its a good and healthy way.
What do you think?
// main Window: var myWindow = new Window ("palette"); #include myScripts/Script1.jsx #include myScripts/Script2.jsx myWindow.show(); // splited Scripts: var myButton1 = myWindow.add ("button {text:'Button1'}"); myButton1.onClick = function(){myButton1Function()}; function myButton1Function(){ alert("ok"); };