Sets the current model on this controller
181416
def model=(val)
      if val.is_a?(Promise)
        # Resolve the promise before setting
        self.last_promise = val

        val.then do |result|
          # Only assign if nothing else has been assigned since we started the resolve
          self.model = result if last_promise == val
        end.fail do |err|
          Volt.logger.error("Unable to resolve promise assigned to model on #{inspect}")
        end

        return
      end

      # Clear
      self.last_promise = nil

      # Start with a nil reactive value.
      self.current_model ||= Model.new

      if Symbol === val || String === val
        collections = [:page, :store, :params, :controller]
        if collections.include?(val.to_sym)
          self.current_model = send(val)
        else
          fail "#{val} is not the name of a valid model, choose from: #{collections.join(', ')}"
        end
      else
        self.current_model = val
      end
    end
308055
public function set()
    {
        // Register term meta on Rest API.
        if (function_exists('current_filter') && 'init' === current_filter()) {
            call_user_func($this->register());
        } else {
            $this->action->add('init', $this->register());
        }

        // Display fields.
        $this->action->add($this->taxonomy->getName().'_add_form_fields', $this->outputAddFields());
        $this->action->add($this->taxonomy->getName().'_edit_form_fields', $this->outputEditFields());

        // Save fields values.
        $this->action->add([
            'create_'.$this->taxonomy->getName(),
            'edit_'.$this->taxonomy->getName()
        ], $this->save());
    }
609195
def set_model(self, model):
        
        if self.model:
            self.model.unregister_observer(self)
        self.model = model
        if self.model:
            self.model.register_observer(self)
            self.model_notification()
        else:
            self.set_widget(None)
        self.widget.set_sensitive(bool(self.model))
1314832
def start(self):
        
        current_pedalboard = self.controller(CurrentController).pedalboard
        if current_pedalboard is None:
            self.log('Not exists any current pedalboard.')
            self.log('Use CurrentController to set the current pedalboard')
        else:
            self.log('Load current pedalboard - "{}"', current_pedalboard.name)

        self.mod_host.pedalboard = current_pedalboard

        for component in self.components:
            component.init()
            self.log('Load component - {}', component.__class__.__name__)

        self.log('Components loaded')
        atexit.register(self.stop)
81875
public void showControllerModel(boolean flag)
    {
        boolean show = flag && isEnabled();
        mShowControllerModel = flag;
        if (mControllerModel != null)
        {
            mControllerModel.setEnable(show);
            mControllerGroup.setEnable(show);
        }
        else if (show)
        {
            createControllerModel();
        }
    }
819695
def model
      @model ||= begin
        if self.class.path_to_model
          m = eval(self.class.path_to_model)
          if m
            if m.respond_to?(:_controller=)
              m.send(:_controller=, self)
            end
          else
            fail "No model object found at path: #{self.class.path_to_model}"
          end
          m
        end
      end
    end
930118
def setModel(self, model):
        
        self.paramList.setModel(model)
        model.hintRequested.connect(self.hintRequested)
        model.rowsInserted.connect(self.updateTitle)
        model.rowsRemoved.connect(self.updateTitle)
        self.updateTitle()
577586
public void setControllerModel(GVRSceneObject controllerModel)
    {
        if (mControllerModel != null)
        {
            mControllerGroup.removeChildObject(mControllerModel);
        }
        mControllerModel = controllerModel;
        mControllerGroup.addChildObject(mControllerModel);
        mControllerModel.setEnable(mShowControllerModel);
    }
30974
protected function setCurrentModelClass()
    {
        if ( ! $this->router->isModelRoute()) {
            $this->currentModelClass = null;
            return $this;
        }

        $info = $this->repository->getByKey(
            $this->router->getModuleKeyForCurrentRoute()
        );

        if ($info) {
            $this->currentModelClass = $info->original_model ?: $info->model;
        } else {
            $this->currentModelClass = null;
        }

        $this->activeModelClass = $this->currentModelClass;

        return $this;
    }
248408
public void setModel(TableModel model)
    {
// Column 3 and 4: (Scroll Pane Headings)
        if (m_model != null)
            m_model.removeTableModelListener(this);
        m_model = model;
        if (model != null)
            model.addTableModelListener(this);
        this.setupPanel();      // setup a new panel
    }
481453
public function setModel(Model $model)
    {
        $this->model = $model;
        $this->fm = $this->model->loadFunctionMap();
    }
1013522
public function init() {

		parent::init();

		$this->modelService = isset( $this->modelService ) ? $this->modelService : $this->controller->modelService;
	}
1115262
function(callback) {
    // Activate current
    var current = $state.current();

    if(current) {

      // Reset
      _resetActive().then(function() {

        // Render
        var viewsPromised = {};
        var templates = current.templates || {};
        var controllers = current.controllers || {};
        angular.forEach(templates, function(template, id) {
          if(_viewHash[id]) {
            var view = _viewHash[id];
            var controller = controllers[id];
            viewsPromised[id] = _renderView(id, view, template, controller);
            _activeSet[id] = view;
          }
        });

        $q.all(viewsPromised).then(function() {
          callback();
        }, callback);

      }, callback);

    // None
    } else {
      callback();
    }
  }
779150
def setModel(self, model):
        

        LOGGER.debug("> Setting '{0}' model.".format(model))

        if not model:
            return

        umbra.ui.views.Abstract_QTreeView.setModel(self, model)
609715
public function setCurrent(): void
	{
		$this->current = true;
		$parent = $this->parent;
		if ($parent instanceof Item) {
			$parent->setCurrent();
		}
	}
253180
def set_value(self, iter, column, value):
        """"""

        # Delegate to child model
        iter = self.convert_iter_to_child_iter(iter)
        self.get_model().set_value(iter, column, value)
1014661
def set_controller_value(self, index_or_name, value):
        
        if not isinstance(index_or_name, int):
            index = self.get_controller_index(index_or_name)
        else:
            index = index_or_name
        self.dll.SetControllerValue(index, ctypes.c_float(value))