jean-emmanuel / open-stage-control

Libre and modular OSC / MIDI controller
https://openstagecontrol.ammd.net
GNU General Public License v3.0
695 stars 88 forks source link

/EDIT dropdown in fragment issue #840

Closed patricecolet closed 5 months ago

patricecolet commented 5 months ago

Hello,

I've got a dropdown embedded into a fragment with id = 'sampleFolderSelect'

from my custom module extension (a js file required by my custom module) I use this line of code to set the dropdown:

receive('/EDIT','sampleFolderSelect','dedale')

My client console replies in red this message:

SyntaxError: JSON5: invalid character 'd' at 1:1 at r (node_modules/json5/dist/index.js:1:0) at r (node_modules/json5/dist/index.js:1:0) at r (node_modules/json5/dist/index.js:1:0) at r (node_modules/json5/dist/index.js:1:0) at r (node_modules/json5/dist/index.js:1:0) at EDIT (src/client/remote-control.js:16:53) at exec (src/client/remote-control.js:312:28) at receive (src/client/osc.js:72:123) at receiveOsc (src/client/ipc/callbacks.js:23:12) at require (src/client/ipc/index.js:68:25) at this._listeners[evt].slice (src/client/events/event-emitter.js:36:29) at Array.isArray (src/client/ipc/index.js:158:21) at onmessage (src/client/ipc/index.js:105:21)

I still can use osc to set the dropdown with this line of code:

receive('localhost','5000', '/sampleFolderSelect, 'dedale')

But I guess this looks like a bug with the '/EDIT' stuff

patricecolet commented 5 months ago

The error message is triggered because I did use a wrong code so I'm using this instead:

receive('/EDIT', "sampleFolderSelect", { "value": 'dedale'}, { clientId: clientId: });

patricecolet commented 5 months ago

Once again I got confused by synthax that is very different following the context, sorry for the noise.