> Thoughts?
I think you should consider once more whether this big and complicated
machinery is really the best approach.
It seems to be, looking from the sideline, that you have come to this
point like this: First, an initial buttoncontroller was build. This
turned out to be not as general as it could be, so it was rebuild in
a better self. Then, this was introduced, but once again, it turned out
that it was insufficient.
Now, you can come up with a fairly general, but also quite complicated
design. This general design looks like a kind of state machine facility.
For each widget, you define a mapping to reflect whether it should be
enabled or not.
At first, this does indeed look fairly general, and certainly a
step in the right direction. However, my bet is that you will need to
extend even this general mechanism fairly soon. Then, you will discover
that some dialog should enable and disable buttons according to what a
certain input field contains, what item is selected in a drop list,
and so on.
It seems to me that the problem is very hard: It's not by accident that
there does not exist a one-size-fits-all GUI design. Every toolkit does
things it's own way, and so far, nobody has come up with a design that
is general enough to support all needs. Now, this is not to say that it
is not possible to come up with such a design at all. It's just a word
of caution: It will prove harder than it seems.
Given this, it's worth stopping and considering the best way to support
the GUII work. Is it really worth the effort to develop the best and most
general controller abstraction?
Would it not be better to hold it, and just do the Model/ViewController
split as discussed earlier?
Greets,
Asger