summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-07 21:54:57 -0500
committerJeff Carr <[email protected]>2023-04-07 21:54:57 -0500
commit59df0c2e206a6d9a77041b1ed14c9069d3f779ab (patch)
tree55e1d39f10fe8382989e39ff5817fa8ce1b80dbe /main.go
parenta975a73ac133d1ba76cb5babd950bd19d36e8443 (diff)
more progres on channels
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/main.go b/main.go
index 65c184a..db9664d 100644
--- a/main.go
+++ b/main.go
@@ -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)
}