summaryrefslogtreecommitdiff
path: root/plugin.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-05-09 18:50:16 -0500
committerJeff Carr <[email protected]>2023-05-09 18:50:16 -0500
commitc36725fa90acc47fe5c0650f93540b5d65a126b6 (patch)
tree287e41eecaa606aa0714e6e2126327c8aa83aa14 /plugin.go
parentb392c40969e105b00efa262042d647303d6fbc2c (diff)
simplify sendAction()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'plugin.go')
-rw-r--r--plugin.go19
1 files changed, 17 insertions, 2 deletions
diff --git a/plugin.go b/plugin.go
index eba3256..1b9b290 100644
--- a/plugin.go
+++ b/plugin.go
@@ -212,16 +212,31 @@ func newAction(n *Node, atype toolkit.ActionType) *toolkit.Action {
a.Name = n.Name
a.Text = n.Text
a.WidgetId = n.id
+ a.B = n.B
+ a.X = n.X
+ a.Y = n.Y
if (n.parent != nil) {
a.ParentId = n.parent.id
}
a.WidgetType = n.WidgetType
-
return &a
}
+// func sendAction(a *toolkit.Action) {
func sendAction(a *toolkit.Action, n *Node, where *Node) {
- newaction(a, n, where)
+ // newaction(a, n, where)
+ for _, aplug := range allPlugins {
+ log(debugPlugin, "Action() aplug =", aplug.name, "Action type=", a.ActionType)
+ if (aplug.pluginChan == nil) {
+ log(logInfo, "Action() retrieving the aplug.PluginChannel()", aplug.name)
+ aplug.pluginChan = aplug.PluginChannel()
+ log(logInfo, "Action() retrieved", aplug.pluginChan)
+ }
+ log(logInfo, "Action() SEND to pluginChan", aplug.name)
+ aplug.pluginChan <- *a
+ // added during debugging. might be a good idea in general for a tactile experience
+ sleep(.02)
+ }
}
// 2023/04/06 Queue() is also being used and channels are being used. memcopy() only