mod-audio / mod-sdk

SDK to implement the MOD gui interface
GNU General Public License v3.0
34 stars 16 forks source link

Uncaught ReferenceError: mod_port is not defined #31

Open brummer10 opened 1 year ago

brummer10 commented 1 year ago

modgui.js:357:28

A trigger port throw this error when pressed in the mod-sdk, could be fixed by define mod_port in

this.setPortWidgetsValue = function (symbol, value, source, only_gui) {

diff --git a/html/js/modgui.js b/html/js/modgui.js
index 5fa88aa..eab7f0b 100644
--- a/html/js/modgui.js
+++ b/html/js/modgui.js
@@ -325,6 +325,7 @@ function GUI(effect, options) {
         var label, valueField, widget,
             port = self.controls[symbol]

+        var mod_port = source ? source.attr("mod-port") : (self.instance ? self.instance+'/'+symbol : symbol)
         port.value = value

         for (var i in port.widgets) {