Question
import main in class
I'm wondering if this would work and if it does if its bad
programming practice or not. I am trying to do things right and
don't want to develop bad habbits...anyway if I have a class with a
button and I want that button to call a function in main (the main
document class) could I import main to that class so it has access
in a handler to call the function in main? I'm trying to figure out
a way to have button panels (a message I left here earlier) control
different aspects of a game, ie..startOver, Quit, etc...I know I
can create the buttons in main and it will work but I want to
encapsulate them in functional 'button' panels. Since the main
functionally of the game lies in 'main' how can I encapulate the
button panel(s) with the appropreate buttons to control
functionallity in main? I'm not looking for someone to give me the
code...just someone with more Class knowledge to steer me in the
right direction. THANKS!