summaryrefslogtreecommitdiff
path: root/plugin.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-23 07:37:24 -0500
committerJeff Carr <[email protected]>2023-04-23 07:37:24 -0500
commit2d4d2b6b3e115a86a10f98c20de0e4e82be519c2 (patch)
tree4cab36495872e70220e47b1790189249c3e2bcdc /plugin.go
parentaeb998eea5ef67c1c87664340b89b5e415fb0747 (diff)
actually ran again without crashing
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'plugin.go')
-rw-r--r--plugin.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugin.go b/plugin.go
index de8dd76..7dedd22 100644
--- a/plugin.go
+++ b/plugin.go
@@ -189,6 +189,7 @@ func sendCallback(p *aplug, funcName string) func(chan toolkit.Action) {
return newfunc
}
+/*
func loadFunc2(p *aplug, funcName string) func(*toolkit.Widget, *toolkit.Widget) {
var newfunc func(*toolkit.Widget, *toolkit.Widget)
var ok bool
@@ -207,6 +208,7 @@ func loadFunc2(p *aplug, funcName string) func(*toolkit.Widget, *toolkit.Widget)
}
return newfunc
}
+*/
// does this fix loadFuncE problems?
// TODO: still need to move to channels here
@@ -307,7 +309,7 @@ func loadfile(filename string) *plugin.Plugin {
func newaction(a *toolkit.Action, n *Node, where *Node) {
if (n != nil) {
a.WidgetId = n.id
- a.WidgetType = n.widget.Type
+ a.WidgetType = n.WidgetType
a.ActionType = a.ActionType
}
@@ -315,7 +317,7 @@ func newaction(a *toolkit.Action, n *Node, where *Node) {
if (where != nil) {
log(logInfo, "Action() START on where X,Y, Next X,Y =", where.Name, where.X, where.Y, where.NextX, where.NextY)
a.ParentId = where.id
- switch where.widget.Type {
+ switch where.WidgetType {
case toolkit.Grid:
// where.Dump(true)
log(logInfo, "Action() START on Grid (X,Y)", where.X, where.Y, "put next thing at (X,Y) =", where.NextX, where.NextY)
@@ -348,7 +350,7 @@ func newaction(a *toolkit.Action, n *Node, where *Node) {
}
// increment where to put the next widget in a grid or table
if (where != nil) {
- switch where.widget.Type {
+ switch where.WidgetType {
case toolkit.Grid:
log(logInfo, "Action() START size (X,Y)", where.X, where.Y, "put next thing at (X,Y) =", where.NextX, where.NextY)
where.NextY += 1