Checks if the run button should be enabled.
170038
private void checkRunButton()
	{
		runButton.setEnabled((pcRadio.isSelected() ||
			(customFileRadio.isSelected() && !modelField.getText().trim().isEmpty()) ||
			(customURLRadio.isSelected() && !urlField.getText().trim().isEmpty()))
			&& !outputField.getText().trim().isEmpty());
	}
975956
def accept(self):
        """"""
        if not self.runconfigoptions.is_valid():
            return
        configurations = _get_run_configurations()
        configurations.insert(0, (self.filename, self.runconfigoptions.get()))
        _set_run_configurations(configurations)
        QDialog.accept(self)
26763
private void checkRunningState() {
    RunningJob running = null;
    try {
      running = jc.getJob(this.mapredJobID);
      if (running.isComplete()) {
        if (running.isSuccessful()) {
          this.state = Job.SUCCESS;
        } else {
          this.state = Job.FAILED;
          this.message = "Job failed!";
          try {
            running.killJob();
          } catch (IOException e1) {

          }
          try {
            this.jc.close();
          } catch (IOException e2) {

          }
        }
      }

    } catch (IOException ioe) {
      this.state = Job.FAILED;
      this.message = StringUtils.stringifyException(ioe);
      try {
        if (running != null)
          running.killJob();
      } catch (IOException e1) {

      }
      try {
        this.jc.close();
      } catch (IOException e1) {

      }
    }
  }
991128
@Api
	public void runWhenInitialized(Runnable runnable) {
		if (isInitialized()) {
			runnable.run();
		} else {
			whenInitializedRunnables.add(runnable);
		}
	}
550656
function doRun() {
    if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening
    Module['calledRun'] = true;

    if (ABORT) return;

    ensureInitRuntime();

    preMain();


    if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();

    if (Module['_main'] && shouldRunNow) Module['callMain'](args);

    postRun();
  }
344083
function() {
      inputEx.Form.superclass.enable.call(this);
      
      for (var i = 0 ; i < this.buttons.length ; i++) {
 	      this.buttons[i].enable();
      }
   }
1069954
protected function _isActionEnabled() {
		$actions = $this->getConfig('actions');
		if (!$actions) {
			return true;
		}

		return in_array($this->getController()->getRequest()->getParam('action'), $actions, true);
	}
1067214
function _setDisabled(_button, _value) {
      var _btnWidget = _button.data('ui-button');
      if (_btnWidget.option('disabled') !== _value) {
        _btnWidget.option('disabled', _value);
      }
    }
855204
@Override
    public void run() {
	try {
	    try {
		turnsControl.waitTurns(1, "Robot starting"); // block at the beginning so that all
							     // robots start at the
		// same time
	    } catch (BankInterruptedException exc) {
		log.trace("[run] Interrupted before starting");
	    }

	    assert getData().isEnabled() : "Robot is disabled";

	    mainLoop();

	    log.debug("[run] Robot terminated gracefully");
	} catch (Exception | Error all) {
	    log.error("[run] Problem running robot " + this, all);
	    die("Execution Error -- " + all);
	}
    }
57228
def update_button_status(self):
        
        # enable/disable ok button
        if len(self.displaced.currentField()) > 0:
            self.button_box.button(
                QtWidgets.QDialogButtonBox.Ok).setEnabled(True)
        else:
            self.button_box.button(
                QtWidgets.QDialogButtonBox.Ok).setEnabled(False)
700283
private function check_if_enabled()
    {
        if ($this->config['enabled'] == true && extension_loaded('sqlite3')) {
            $this->enabled = true;
        } else {
            $this->enabled = false;
        }
    }
1153003
public function isEnabled()
    {
        if ($this->enabled === null) {
            $config = $this->app['config'];
            $configEnabled = value($config->get('debugbar.enabled'));

            if ($configEnabled === null) {
                $configEnabled = $config->get('app.debug');
            }

            $this->enabled = $configEnabled && !$this->app->runningInConsole() && !$this->app->environment('testing');
        }

        return $this->enabled;
    }
983404
public void setOkButtonEnabled(final boolean enabled) {

        Scheduler.get().scheduleDeferred(new ScheduledCommand() {

            /**
             * @see com.google.gwt.core.client.Scheduler.ScheduledCommand#execute()
             */
            public void execute() {

                // The event handling of GWT gets confused if we don't execute this as a scheduled command
                getOkButton().setDown(false);
                getOkButton().setEnabled(enabled);
            }
        });

    }
1170261
def _check_first_run(self):
        '''
        
        '''
        if self.cfg['first_run']:
            self.cfg['first_run'] = False
            self.cfg.save()
            return True
        else:
            return False
529787
final static void enable() {
		if (lifeCycle.getStatus().equals(RunStatus.READY) || lifeCycle.getStatus().equals(RunStatus.STOPPED)) {
			init();
		} else if (lifeCycle.getStatus().equals(RunStatus.DISABLED)) {
			lifeCycle.setStatus(RunStatus.RUNNING);
		}
	}
758205
public static void runByBoolean(boolean bool, Runnable trueBlock,
            Runnable falseBlock) {
        if (bool)
            trueBlock.run();
        else
            falseBlock.run();
    }
1047959
public final void running () {
		Status previousStatus = status;
		status = Status.RUNNING;
		if (tree.listeners != null && tree.listeners.size > 0) tree.notifyStatusUpdated(this, previousStatus);
		if (control != null) control.childRunning(this, this);
	}