示例#1
0
        private void wireUp(IUpdaterControl paramController, IUpdaterModel paramModel)
        {
            if (model != null)
            {
                model.removeObserver(this);
            }

            this.model      = paramModel;
            this.controller = paramController;

            //Reversing the method calls
            controller.setView(this);
            controller.setModel(model);

            model.addObserver(this);
        }
示例#2
0
        private void wireUp(IUpdaterControl paramController, IUpdaterModel paramModel)
        {
            if (model != null)
            {
                model.removeObserver(this);
            }

            this.controller = paramController;
            this.model      = paramModel;

            //Reverses the method calls so that NPE is avoided when there's no DB conection (otherwise the disableControls() method of the View would be called on a null object)
            controller.setView(this);
            controller.setModel(model);


            model.addObserver(this);
        }