SimpleController:
Filter:
Classes | Core

SimpleController : Object

Controller according to the model-view-controller (M-V-C) paradigm
Source: Model.sc

Description

SimpleController can be used as a controller according to the model-view-controller (M-V-C) paradigm. It provides an IdentityDictionary of actions, which are called whenever the attached model sends a notification by calling changed.

Class Methods

SimpleController.new(model)

Creates a SimpleController instance with the model to be observed.

Arguments:

model

An object of any class

Inherited class methods

Instance Methods

.put(what, action)

Arguments:

what

Register an action, which is called when the model invokes changed(what, moreArgs).

action

Action to register.

.remove

Remove a registered action.

Arguments:

(action)

Action to remove

Inherited instance methods

Undocumented instance methods

.removeAt(what)

Examples