package; /** * View is controlled only by Model * @author Sylvio Sell, Rostock Germany 2017 */ class View implements ViewInterface { public var model:ModelInterface; //public var control:ControlInterface; public function new() {} public function addModel(model:ModelInterface):Void { trace("View.addModel()"); this.model = model; model.msgFromView(this, "Hello from VIEW"); } public function delModel():Void { trace("View.delModel()"); this.model = null; } public function msgFromModel(msg):Void { trace("View.onMessage(): " + msg); } }