next up previous contents
Next: Implementation of the Observer Up: Implementation of the MVC Previous: Implementation of the MVC   Contents


View Registration

Current implementation allows only a 1-1 relationship between Controller and View. Anyway a registration mechanism has been provided to connect those two parts, allowing for more generic relationship in the future, when a Controller could handle more than one View, or a View can be shared among several Controllers.

After the creation, a View must register itself with a Controller. From there on, the Controller can access the state (the set of contained widgets) and methods inside the View. When the view registers itself with a Controller, all signals are also automatically connected to the corresponding methods inside the Controller. Connection in this case is performed by means of an implicit syntax rule, which binds a signal name to a corresponding method name.

In sections 5.3.2 and 5.4.4 more details and an example are presented, to show how the View registration mechanism can be exploited by controllers to connect signals and handle the creation of particular widgets like for example TreeViews, TreeColumns, CellRenderers, etc.



Roberto Cavada 2008-08-26