User Tools

Site Tools


components_js

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
components_js [2018/03/12 19:19]
be.ing [Setup]
components_js [2019/02/17 11:23] (current)
be.ing [Methods] document need to specify group and outKey for connect to be called automatically on construction
Line 141: Line 141:
   * **input**: the [[MIDI scripting#​MIDI input handling functions|function that receives MIDI input]]   * **input**: the [[MIDI scripting#​MIDI input handling functions|function that receives MIDI input]]
   * **output**: the [[midi scripting#​Connect output callback functions|function that gets called when outKey changes value]]. Typically this sends MIDI output to the controller to change the state of an LED, but it can do anything.   * **output**: the [[midi scripting#​Connect output callback functions|function that gets called when outKey changes value]]. Typically this sends MIDI output to the controller to change the state of an LED, but it can do anything.
-  * **connect**:​ register ''​output''​ as the callback function that gets executed when the value of the [[mixxxcontrols|Mixxx ControlObject]] specified by ''​group'',​ ''​outKey''​ changes. Implement a custom function if you need to connect callbacks for multiple Mixxx ControlObjects in one Component. Refer to the source code of [[#​SamplerButton|SamplerButton.prototype.connect]] for an example.+  * **connect**:​ register ''​output''​ as the callback function that gets executed when the value of the [[mixxxcontrols|Mixxx ControlObject]] specified by ''​group'',​ ''​outKey''​ changes. This is called automatically by the Component constructor if ''​group''​ and ''​outKey''​ are defined (otherwise it needs to be called after construction). Implement a custom function if you need to connect callbacks for multiple Mixxx ControlObjects in one Component. Refer to the source code of [[#​SamplerButton|SamplerButton.prototype.connect]] for an example.
  
 The following methods are called by the default Component ''​input''​ and ''​output''​ methods, as well as the default ''​input''​ functions of [[#​Button]],​ [[#Pot]], and [[#​Encoder]]. If you do not need to implement complex custom behavior, you can overwrite these instead of the default ''​input''​ and ''​output''​ methods: The following methods are called by the default Component ''​input''​ and ''​output''​ methods, as well as the default ''​input''​ functions of [[#​Button]],​ [[#Pot]], and [[#​Encoder]]. If you do not need to implement complex custom behavior, you can overwrite these instead of the default ''​input''​ and ''​output''​ methods:
components_js.1520896798.txt.gz ยท Last modified: 2018/03/12 19:19 by be.ing