I'm using an (C++) SDK (Marmalade) and building a project around the MVC pattern. On my app, user input listeners may be registered on certain UI elements/widgets/etc providing a proper callback function (according to MVC should be a method of a controller, right?).
In this scenario, who should register these listeners:
- The controller? (must have access to the view UI elements, less decoupling of control from presentation)
- Or the view? (direct access to UI elements but must have a reference to the controller, isn't this incorrect in MVC?)
Between the two, I think the latter makes more sense and does better separation of concerns, but I'm afraid that I overlooked some problem with that design.
Thanks in advance.