diff --git a/main.go b/main.go index 8e75031..8ead495 100644 --- a/main.go +++ b/main.go @@ -71,10 +71,13 @@ func mainGogui() { if r := recover(); r != nil { log.Warn("YAHOOOO Recovered in guiMain application:", r) log.Warn("Recovered from panic:", r) + me.baseGui.Close() + log.Sleep(1) + me.myTree.SendToolkitPanic() log.Warn("Stack trace:") debug.PrintStack() - // panic("BUMMER") + panic("BUMMER") return } }() diff --git a/plugin.go b/plugin.go index 204b77a..a1c6a08 100644 --- a/plugin.go +++ b/plugin.go @@ -8,7 +8,7 @@ import ( ) func action(a widget.Action) { - log.Log(NOW, "action() START", a.WidgetId, a.ActionType, a.WidgetType, a.ProgName) + log.Log(INFO, "action() START", a.WidgetId, a.ActionType, a.WidgetType, a.ProgName) // n := me.rootNode.findWidgetId(a.WidgetId) n := me.treeRoot.FindWidgetId(a.WidgetId) var w *guiWidget @@ -154,6 +154,10 @@ func (w *guiWidget) SetText(text string) { } func (w *guiWidget) Set(val any) { + if w == nil { + log.Log(WARN, "Set() w == nil. val =", val) + return + } log.Log(INFO, "Set() value =", val) w.value = val.(string)