Re: [NetBeans]changing menuitems



Mark Space wrote:
Lew wrote:
RedGrittyBrick wrote:
Rather than telling GenListView what to do, maybe you should look at it the other way around and provide methods that allow you to tell GenListView about some external event, then let GenListView decide on appropriate changes to it's display.

I think you may need to disentangle your View from your Controller.

This excellent advice got me to thinking how to summarize the principle pithily,

The View watches the Model. The Model ignores the View.


I didn't read those links yet, but is this correct? I thought in the classic MVC model the Model and the View ignored each other and both were manipulated by the Controller only. Separation of these two is the whole point.

I don't know about the links, it's my take on the whole thing. The View has to be notified of changes in the Model in order to update itself, so it watches for changes.

But based on your input, perhaps I should say:

The Controller watches the Model. The View listens to the Controller.

--
Lew
.



Relevant Pages

  • Re: [NetBeans]changing menuitems
    ... Lew wrote: ... it the other way around and provide methods that allow you to tell GenListView about some external event, then let GenListView decide on appropriate changes to it's display. ... I thought in the classic MVC model the Model and the View ignored each other and both were manipulated by the Controller only. ...
    (comp.lang.java.help)
  • Re: [NetBeans]changing menuitems
    ... RedGrittyBrick wrote: ... the other way around and provide methods that allow you to tell GenListView about some external event, then let GenListView decide on appropriate changes to it's display. ... The View watches the Model. ...
    (comp.lang.java.help)