Hello coders,
I'm having a problem with the concept of MVC and OOP. I have built a GUI form with various portions and I'm trying to update it from another class. I'm having difficulty accessing it. I understand the idea of accessing a child:
... but how do you access it when you're NOT in the class that spawned it? I was thinking that I have to pass something common, ie a parent class, and access it like:Code:someclass Thing = new someclass();
Thing.doWhatever();
me.parent.otherChild.whatever();
Problem is that the program starts up from a static class (main), so I can't pass anything (keyword "this" doesn't work from a static class). I also can't start a timer or anything else non-static, so I have to separate out my main code into another class called "program." In that I can run timers and whatever else I want as it's constructor is non-static. I think that's where the majority of my code will be, if only I can figure out how to access the GUI again.
My structure:
main.class = spawns GUI, spawns program.class instance "Program whatever = new Program()"
program.class = starts a timer, other code, etc.

