Skip to content

Commit

Permalink
Adding support for dynamic interface in PD by sending a series of key…
Browse files Browse the repository at this point in the history
…:value pairs

To do this we use /control/addWidgetPD address
  • Loading branch information
chaosct committed Mar 27, 2012
1 parent d8b50eb commit ab491cd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions www/js/OSCManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ OSCManager.prototype.processOSCMessage = function() {
eval("control.addWidget(" + w.name + ", control.currentPage);");
return;
break;
case "/control/addWidgetPD":
var w = {};
for (var i = 2; i < arguments.length; i+=2)
{
w[arguments[i]]=arguments[i+1];
}
var _w = control.makeWidget(w);
control.widgets.push(_w);
eval("control.addWidget(" + w.name + ", control.currentPage);");
return;
break;
case "/control/removeWidget":
control.removeWidgetWithName(arguments[2]);
return;
Expand Down

0 comments on commit ab491cd

Please sign in to comment.