On 11/13/24 09:21, adam johnson wrote:
And you can maybe use plugin-dispatch-receiver for a vanilla solution, something like:
[loadbang] | [plugin-dispatch start-plugin args | [s pd]
then in the plugin itself
proc start-plugin (args) { source this-plugin.tcl }
that looks like a hen-egg problem. in order to be able to call "plugin-dispatch", the gui-plugin has to register with the plugin-dispatcher... and in order to do that, it has to be loaded first (in which case you've already solved the problem).
or to put differently: "plugin-dispatch" is not a way to send arbitrary commands to the GUI.
also note that you probably shouldn't "source" the tcl-code directly, but instead use the 'load_plugin_script' proc (which adds some safety around the actual sourcing)
gmasdr IOhannes