Tag Info

New answers tagged

0

The two input boxes are two views onto the same value. If one box is changed, the other is changed as well. Therefore, there should be no separate “on change” event to subscribe to. The two immediate event handlers just emit one common event that takes note of which box was edited. Pseudocode: class ConvertFromTo(from: Input, to: Input) { val on-change = ...


0

Add an argument called sender which can be chained together as events are raised. As a first step check to see if if the current object is on the chain, if so, just mark as handled so no updates occur. Example Button1 initiates change. Sender: Button1 Button2 intercepts, first thing it does is check if it's already on the sender chain. In this case it ...


3

No, having the View observe the Model (or perform other read actions on the Model) is a valid implementation of the MVC pattern. There are two main ways that the MVC pattern is typically implemented and they differ mostly in how the information from the Model gets to the View. In the first form, all information passes through the Controller, who is made ...



Top 50 recent answers are included