In the application I'm working on, I applied the MVC pattern to use different views to display parts of the user interface. The general user interface has an input field in which the user can give commands or requests. The idea is that this input block generates several basic events, such as ValidEntry, InvalidEntry, and EmptyEntry. Each part of the controller must respond to these events. I do not want each controller to be subscribed to the ValidEntry event for a response, only the one that is active.
I could add an βifβ to each event handler that checks if this.IsActive is true, and updates it on each view switcher. Or add different events for all different controllers. Any better ideas on this issue?
source
share