diff options
| author | Jeff Carr <[email protected]> | 2024-02-09 10:26:42 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-09 10:26:42 -0600 |
| commit | ec829f6e2be515b717d0ebd20b56623e44aff810 (patch) | |
| tree | 77551f22d4ffcdbdc54d10ee94e1c1230eec5693 /init.go | |
| parent | 12829e6e1c193bf7e98d9b13129d16c862995491 (diff) | |
binary tree is global
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -2,6 +2,7 @@ package tree import ( "errors" + "os" "runtime/debug" "sync" @@ -13,7 +14,7 @@ var muAction sync.Mutex // TODO: add checks for nil function pointers func (me *TreeInfo) newAction(a widget.Action) { - n := me.treeRoot.FindWidgetId(a.WidgetId) + n := treeRoot.FindWidgetId(a.WidgetId) switch a.ActionType { case widget.Add: if n == nil { @@ -83,6 +84,9 @@ func (me *TreeInfo) catchActionChannel() { me.SendToolkitPanic() debug.PrintStack() me.ToolkitClose() + if me.PluginName == "nocui" { + os.Exit(-1) + } } }() log.Log(TREE, "catchActionChannel() START") @@ -108,12 +112,6 @@ func New() *TreeInfo { me := new(TreeInfo) me.pluginChan = make(chan widget.Action, 1) - /* - full := "go.wit.com/gui" - short := "gui" - TREE = log.NewFlag("TREE", true, full, short, "treeRoot info") - */ - log.Log(TREE, "Init() start channel reciever") go me.catchActionChannel() log.Log(TREE, "Init() END") |
