User Tools

Site Tools



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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
midi_scripting [2018/11/25 15:36] [Soft-takeover] clarify when softTakeoverIgnoreNextValue should be called
midi_scripting [2019/04/21 22:23] (current) [Connect output callback functions] note that isConnected is new in 2.3
Line 201: Line 201:
 syncConnection = engine.makeConnection('​[Channel3]',​ '​sync_enabled',​ syncButtonOutputCallback);​ syncConnection = engine.makeConnection('​[Channel3]',​ '​sync_enabled',​ syncButtonOutputCallback);​
 syncConnection.trigger();​ syncConnection.trigger();​
 +//New in Mixxx 2.3:// You can check if a connection is disconnected by checking ''​isConnected''​ or by comparing the return value of ''​disconnect()'':​
 +<code javascript>​
 +var syncConnection = engine.makeConnection('​[Channel1]',​ '​sync_enabled',​ function () {});
 +print(syncConnection.isConnected);​ // prints true
 +var successful_disconnect = syncConnection.disconnect();​
 +if (successful_disconnect) {
 +    print("​syncConnection has been successfully disconnected"​);​
 +} else {
 +    print("​There was an error disconnecting SyncConnection"​);​
 +    // can happen when the connection has already been disconnected
 +print(syncConnection.isConnected);​ // prints false in most cases
 </​code>​ </​code>​
midi_scripting.1543178206.txt.gz ยท Last modified: 2018/11/25 15:36 by