From dfb7a47e8cccd82080de3d6ba97855eeb2be6593 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 20 Jan 2024 19:32:30 -0600 Subject: log settings works again still dreaming of protobuf here go mod update show panic for now finally drop sending stuff for non-visable windows Signed-off-by: Jeff Carr --- main.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index f86dc54..91dea02 100644 --- a/main.go +++ b/main.go @@ -107,7 +107,7 @@ func watchCallback() { log.Warn("guiChan() Enable Debugging Window") log.Warn("guiChan() TODO: not implemented") log.Warn("guiChan() Listing Toolkits:") - PLUG.Set(true) + PLUG.SetBool(true) me.rootNode.ListToolkits() me.rootNode.ListChildren(true) /* @@ -134,7 +134,16 @@ func watchCallback() { // TODO: implement throttling someday func (n *Node) gotUserEvent(a widget.Action) { log.Info("gotUserEvent() received event node =", n.id, n.progname, a.Value) - n.value = a.Value + + switch n.WidgetType { + case widget.Checkbox: + // n.checked = a.State.Checked // TODO: do this and/or time to switch to protobuf + n.checked = widget.GetBool(a.Value) + default: + } + + n.SetValue(a.Value) + log.Info("gotUserEvent() n.Bool() =", n.Bool(), "n.String() =", n.String()) if n.Custom == nil { log.Info("a Custom() function was not set for this widget") return -- cgit v1.2.3