From 99bb171bd9298fe109c3af649be76a3b73c54b9e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 1 Feb 2024 09:41:16 -0600 Subject: [PATCH] dns control panel work, doesn't update labels Signed-off-by: Jeff Carr --- main.go | 5 ++++- plugin.go | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) 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)