On 11/13/24 22:10, adam johnson wrote:
or to put differently: "plugin-dispatch" is not a way to send arbitrary commands to the GUI.
Could you elaborate on why not? All I can come up with is that it breaks order of operations but so does [sys_gui] and we can work around that in the same way [sys_gui] does if need be. Are my patches/abstractions which use plugin-dispatch this way going to blow up in my face when the stars align?
i don't know how you use it, but:
"plugin-dispatch" has a very clear scope: it is a way to interact with a GUI-plugin from your patch. it is decidedly *not* a way to interact with the Tcl/Tk interpreter (that happens to host the GUI plugin).
the workflow is:
dispatcher, using the ::pd_connect::register_plugin_dispatch_receiver proc
it used to register the method)
the plugin is of course free to do whatever it likes to do with the received data, so it could provide a low-level interface to the Tcl/Tk interpreter.
i hope this clears things up.
gasdmnr IOhannes