summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/init.go b/init.go
index ac5fb09..53d17c2 100644
--- a/init.go
+++ b/init.go
@@ -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")