Skip to main content
5 events
when toggle format what by license comment
Oct 13, 2017 at 18:55 comment added mtber75 You guys answered my question right on the spot :). Thanks. I've implemented in javascript of the model notifying the controller its changes. Basically, the model has a notifier callback/higher-order function where it's input is a state that has been changed within the model. This callback function is called whenever a state of the model is mutated. The controller knows the model and will set the callback function with one of its own functions. Consequently, whenever the state of the model changes, the controller will get notified and run one of its methods.
Oct 13, 2017 at 18:45 vote accept mtber75
Oct 12, 2017 at 14:59 comment added Robert Harvey I like your third bullet. I think there might be some misconceptions about the Event here; you can raise an event on a Model (and have any controller subscribe to that event) without the model having any knowledge of the controller.
Oct 12, 2017 at 9:09 history edited Ewan CC BY-SA 3.0
added 73 characters in body
Oct 12, 2017 at 9:04 history answered Ewan CC BY-SA 3.0