
GUI implementation critique requested
I'm writing a spelling quiz application. There is no menubar. There are no
subwindows. There's just a ShellView, on which appear the widgets required
for the particular quiz.
When the game starts up, the window displays the widgets for selecting a
player, etc., as well as a Start Game button. When that's clicked, a new set
of widgets appear (effectively a new screen) and the quiz starts.
That's the desired appearance from the user perspective (and it's
nonnegotiable:). Here's how I'm presently doing it:
I created a Presenter for the ShellView (OK, the other way around) called
MainWindow, and Presenters for each of the screens (MenuScreen,
PracticeScreen, etc.). I created a ContainerView in VC to represent each
screen, each of which can have its own background color, toolbar, statusbar,
etc.
To start things off, I do
MainWindow>>createSchematicWiring
super createSchematicWiring.
menuScreen := self add: (MenuScreen createIn: self)
That lets the menu screen take over. One of its buttons sends #start to the
shell:
MainWindow>>start
self remove: menuScreen.
practiceScreen := self add: (PracticeScreen createIn: self)
This seems to be working well (except for keyboard accelerators, which don't
seem to make it down to the subpresenters), and it seems so simple that I
have a good feeling about it.
But, like everything else at this stage, it took me a _long_ time to figure
out. Will this work?