Register a view render with RAF.
487769
function(callback, deferred) {
    var root = this;
    var manager = root.__manager__;
    var rentManager = manager.parent && manager.parent.__manager__;

    // Allow RAF processing to be shut off using `useRAF`:false.
    if (this.useRAF === false) {
      if (manager.queue) {
        aPush.call(manager.queue, callback);
      } else {
        manager.queue = [];
        callback();
      }
      return;
    }

    // Keep track of all deferreds so we can resolve them.
    manager.deferreds = manager.deferreds || [];
    manager.deferreds.push(deferred);

    // Schedule resolving all deferreds that are waiting.
    deferred.done(resolveDeferreds);

    // Cancel any other renders on this view that are queued to execute.
    this._cancelQueuedRAFRender();

    // Trigger immediately if the parent was triggered by RAF.
    // The flag propagates downward so this view's children are also
    // rendered immediately.
    if (rentManager && rentManager.triggeredByRAF) {
      return finish();
    }

    // Register this request with requestAnimationFrame.
    manager.rafID = root.requestAnimationFrame(finish);

    function finish() {
      // Remove this ID as it is no longer valid.
      manager.rafID = null;

      // Set flag (will propagate to children) so they render
      // without waiting for RAF.
      manager.triggeredByRAF = true;

      // Call original cb.
      callback();
    }

    // Resolve all deferreds that were cancelled previously, if any.
    // This allows the user to bind callbacks to any render callback,
    // even if it was cancelled above.
    function resolveDeferreds() {
      for (var i = 0; i < manager.deferreds.length; i++){
        manager.deferreds[i].resolveWith(root, [root]);
      }
      manager.deferreds = [];
    }
  }
136818
def register_view(self, view):
        """"""

        # if stand-alone, connects the window delete event to
        # kill the loop
        if self.view.is_stand_alone():
            import gtk
            self.view.get_top_widget().connect('delete-event',
                 lambda w,e: gtk.main_quit())
            pass
        
        return
104447
def register_view(self, view):
        """"""
        super(ScopedVariableListController, self).register_view(view)

        view['name_col'].add_attribute(view['name_text'], 'text', self.NAME_STORAGE_ID)
        if not isinstance(self.model.state, LibraryState) and self.model.state.get_next_upper_library_root_state() is None:
            view['name_text'].set_property("editable", True)
        view['data_type_col'].add_attribute(view['data_type_text'], 'text', self.DATA_TYPE_NAME_STORAGE_ID)
        if not isinstance(self.model.state, LibraryState) and self.model.state.get_next_upper_library_root_state() is None:
            view['data_type_text'].set_property("editable", True)
        if isinstance(view, ScopedVariablesListView):
            view['default_value_col'].add_attribute(view['default_value_text'], 'text', self.DEFAULT_VALUE_STORAGE_ID)
            if not isinstance(self.model.state, LibraryState) and self.model.state.get_next_upper_library_root_state() is None:
                view['default_value_text'].set_property("editable", True)
            self._apply_value_on_edited_and_focus_out(view['default_value_text'],
                                                      self.apply_new_scoped_variable_default_value)

        self._apply_value_on_edited_and_focus_out(view['name_text'], self.apply_new_scoped_variable_name)
        self._apply_value_on_edited_and_focus_out(view['data_type_text'], self.apply_new_scoped_variable_type)

        if isinstance(self.model, ContainerStateModel):
            self.reload_scoped_variables_list_store()
490907
def bind(renderer, to):
    

    @wraps(to)
    def view(request, **kwargs):
        try:
            returned = to(request, **kwargs)
        except Exception as error:
            view_error = getattr(renderer, "view_error", None)
            if view_error is None:
                raise
            return view_error(request, error)

        try:
            return renderer.render(request, returned)
        except Exception as error:
            render_error = getattr(renderer, "render_error", None)
            if render_error is None:
                raise
            return render_error(request, returned, error)

    return view
1198056
public static void register(Class<? extends View> clazz) {
        if (clazz != null) {
            register(clazz.getSimpleName(), clazz.getName());
        }
    }
452898
def register_calculator_view(request):
    """"""
    if request.method == "POST":
        form = CalculatorRegistrationForm(request.POST)
        logger.debug(form)
        if form.is_valid():
            obj = form.save()
            obj.user = request.user
            obj.save()
            messages.success(request, "Successfully added calculator.")
            return redirect("itemreg")
        else:
            messages.error(request, "Error adding calculator.")
    else:
        form = CalculatorRegistrationForm()
    return render(request, "itemreg/register_form.html", {"form": form, "action": "add", "type": "calculator", "form_route": "itemreg_calculator"})
64990
def register_view(self, view):
        """"""
        super(ToolBarController, self).register_view(view)
        self.view['button_new'].connect('clicked', self.on_button_new_clicked)
        self.view['button_open'].connect('clicked', self.on_button_open_clicked)
        self.view['button_save'].connect('clicked', self.on_button_save_clicked)
        self.view['button_refresh'].connect('clicked', self.on_button_refresh_clicked)
        self.view['button_refresh_selected'].connect('clicked', self.on_button_refresh_selected_clicked)
        self.view['button_refresh_libs'].connect('clicked', self.on_button_refresh_libs_clicked)
        self.view['button_bake_state_machine'].connect('clicked', self.on_button_bake_state_machine_clicked)
623808
def action(cls, view):
        """"""
        name = "%s:%s" % (cls.name, view.__name__)
        path = "%s/%s" % (cls.url, view.__name__)
        cls.actions.append((view.__doc__, path))
        return cls.register(path, name=name)(view)
471296
def register_app(app):
    "  "

    from .views import urls
    app.register_blueprint(urls)

    from .ext import admin
    admin.init_app(app)

    from flask_bootstrap import Bootstrap
    bootstrap = Bootstrap()
    bootstrap.init_app(app)

    from flask import render_template
    app.errorhandler(404)(lambda e: (render_template('core/404.html'), 404))
5337
def register_view(self, view):
        
        super(StateOutcomesEditorController, self).register_view(view)
        if isinstance(view, StateOutcomesEditorView):
            self.connect_signal(view['add_button'], "clicked", self.oc_list_ctrl.on_add)
            self.connect_signal(view['remove_button'], "clicked", self.oc_list_ctrl.on_remove)

            if isinstance(self.model.state, LibraryState) or self.model.state.get_next_upper_library_root_state():
                view['add_button'].set_sensitive(False)
                view['remove_button'].set_sensitive(False)
1020666
def register_view(self, view):
        """"""
        super(ListViewController, self).register_view(view)
        self.tree_view.connect('button_press_event', self.mouse_click)
110674
def render_in_browser(self, **kwargs):
        """"""
        try:
            from lxml.html import open_in_browser
        except ImportError:
            raise ImportError('You must install lxml to use render in browser')
        kwargs.setdefault('force_uri_protocol', 'https')
        open_in_browser(self.render_tree(**kwargs), encoding='utf-8')
243393
protected static function registerView()
    {
        if (self::$_view === null) {
            Yii::$app->view->on(View::EVENT_BEGIN_BODY, function ($event) {
                echo '<script type="application/ld+json">' . Json::encode($event->sender->params) . '</script>';
            });
                    
            self::$_view = true;
        }
    }
452876
public function registerInFormIfPossible()
    {
        parent::registerInFormIfPossible();
        foreach ($this->renderables as $renderable) {
            if ($renderable instanceof AbstractRenderable) {
                $renderable->registerInFormIfPossible();
            }
        }
    }
190996
public function registerViews()
	{
		$viewPath = base_path('resources/views/modules/course');

		$sourcePath = __DIR__.'/../Resources/views';

		$this->publishes([
			$sourcePath => $viewPath
		]);

		$this->loadViewsFrom([$viewPath, $sourcePath], 'course');
	}
48400
public function registerAssets()
    {
        $view = $this->getView();
        $asset = NotyAsset::register($view);
        $asset->animateCss = $this->registerAnimateCss;
        $asset->buttonsCss = $this->registerButtonsCss;
        $asset->fontAwesomeCss = $this->enableIcon && $this->registerFontAwesomeCss;
    }
31889
public function renderView()
    {
        if ($this->path) {
            $this->js(true)->tab(
                ['cache' => false, 'auto' => true, 'path' => $this->path, 'apiSettings' => ['data' => ['__atk_tab' => 1]]]
            );
        } else {
            $this->js(true)->tab();
        }

        if ($this->owner->activeTabName == $this->name) {
            $this->js(true)->click();
        }

        parent::renderView();
    }