From 947169df5a22c9f9b53f825764747f648c70ff1e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 29 Mar 2023 22:44:08 -0500 Subject: ready for version v0.7.4 start deprecating toolkit.Widget switch to variable name 'ParentId' use 'ActionType' and 'WidgetType' preliminary redraw() final definition of variables 'Name' and 'Text' more cleaning of the code remove lots of dumb code bind 'd' key press to dump out debugging info early color handling in gocui! Signed-off-by: Jeff Carr --- plugin.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'plugin.go') diff --git a/plugin.go b/plugin.go index 0f458ef..a9cf4f9 100644 --- a/plugin.go +++ b/plugin.go @@ -185,7 +185,8 @@ func loadPlugin(p *aplug, name string) { homeDir, err := os.UserHomeDir() if err != nil { - exit(err) + log(logError, "loadPlugin() error. exiting here?") + return } // attempt to write out the file from the internal resource @@ -234,15 +235,15 @@ func newaction(a *toolkit.Action, n *Node, where *Node) { if (n != nil) { a.Widget = &n.widget a.WidgetId = n.id - a.WidgetT = n.widget.Type + a.WidgetType = n.widget.Type + a.ActionType = a.ActionType } // action(&a, newNode, n) // newaction(&a, newNode, n) if (where != nil) { log(debugGui, "Action() START on where X,Y, Next X,Y =", where.Name, where.X, where.Y, where.NextX, where.NextY) - // a.Where = &where.widget - a.WhereId = where.id + a.ParentId = where.id switch where.widget.Type { case toolkit.Grid: // where.Dump(true) @@ -264,7 +265,7 @@ func newaction(a *toolkit.Action, n *Node, where *Node) { } for _, aplug := range allPlugins { - log(debugPlugin, "Action() aplug =", aplug.name, "Action type=", a.Type) + log(debugPlugin, "Action() aplug =", aplug.name, "Action type=", a.ActionType) if (aplug.Action == nil) { log(debugPlugin, "Failed Action() == nil for", aplug.name) continue -- cgit v1.2.3