diff options
| author | Jeff Carr <[email protected]> | 2023-04-07 21:54:57 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-07 21:54:57 -0500 |
| commit | 59df0c2e206a6d9a77041b1ed14c9069d3f779ab (patch) | |
| tree | 55e1d39f10fe8382989e39ff5817fa8ce1b80dbe /main.go | |
| parent | a975a73ac133d1ba76cb5babd950bd19d36e8443 (diff) | |
more progres on channels
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -218,12 +218,21 @@ func Main(f func()) { } aplug.MainOk = true if (aplug.Callback == nil) { - // TODO: don't load the module if this failed + // TODO: don't load the module if this failed ? // if Callback() isn't set in the plugin, no information can be sent to it! - log(debugError, "SERIOUS ERROR: Callback() == nil. nothing will work for plugin", aplug.name) + log(debugError, "SERIOUS ERROR: plugin Callback() == nil. nothing will work for toolkit", aplug.name) } else { aplug.Callback(Config.guiChan) } + + if (aplug.PluginChannel == nil) { + // TODO: don't load the module if this failed ? + // if Callback() isn't set in the plugin, no information can be sent to it! + log(debugError, "ERROR: plugin does not implement a send channel. toolkit =", aplug.name) + } else { + aplug.pluginChan = aplug.PluginChannel() + } + aplug.Main(f) } |
