Jun-28-2019, 11:45 AM
Thank you both for your answers.
I'm trying to clean up a program made by a colleague and it's a collection of everything you shouldn't do in programming (think global variables everywhere, while loops, redundant code, etc). I've shrunk the code for calculations by a good 1/3, but the UI really needs to be sorted out.
Right now every "important" variable is accessed like a global from just about anywhere in the code. I think referring to the parent might should the trick to simplify variable access between the modules however I'll have to reorganise everything from scratch first.
I'll have a look at Alfalfa's code as soon as I have time, to see how everything fits together and hopefully get some insight on how to reorganise this mess!
I'm trying to clean up a program made by a colleague and it's a collection of everything you shouldn't do in programming (think global variables everywhere, while loops, redundant code, etc). I've shrunk the code for calculations by a good 1/3, but the UI really needs to be sorted out.
Right now every "important" variable is accessed like a global from just about anywhere in the code. I think referring to the parent might should the trick to simplify variable access between the modules however I'll have to reorganise everything from scratch first.
I'll have a look at Alfalfa's code as soon as I have time, to see how everything fits together and hopefully get some insight on how to reorganise this mess!