Hello:
Given a window with two sets of controls, one of which is invisible at any
one time, and a "toggle" button, which switches the visibility of the
groups. The effect of this is a "two layer" window. Ignore, for the moment,
any procedural approach to this. Rather, I'm wondering is there an objected
oriented approach?
At startup one set of controls would default to "invisible" the other
"visible". The toggle button would originate the switch message. And this
would be received and implemented by any "listener" which happened to be
registered for that event. Registration would be achieved by creating a sub
class of a control and attaching an interface which contains a "switch"
method. The import point here is that the window behavior can be extended
merely by registering more listeners. There is no need to go into the code
and modify a list of controls (or by implementing a loop which is
procedural).
The ideal solution would have "registered listeners" (like those in Java).
Can this be done, or simulated in Revolution?
DW