diff options
| author | Jeff Carr <[email protected]> | 2023-05-09 18:50:16 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-05-09 18:50:16 -0500 |
| commit | c36725fa90acc47fe5c0650f93540b5d65a126b6 (patch) | |
| tree | 287e41eecaa606aa0714e6e2126327c8aa83aa14 /plugin.go | |
| parent | b392c40969e105b00efa262042d647303d6fbc2c (diff) | |
simplify sendAction()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'plugin.go')
| -rw-r--r-- | plugin.go | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -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 |
