From ba95c13799740b5f55541fc5e8ab9f1d34f7e421 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 16 Jan 2024 12:55:20 -0600 Subject: use widget.GetString() Signed-off-by: Jeff Carr --- nocui/common.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'nocui') diff --git a/nocui/common.go b/nocui/common.go index 35d8f22..7b79ca0 100644 --- a/nocui/common.go +++ b/nocui/common.go @@ -12,9 +12,6 @@ package main */ import ( - "reflect" - "strconv" - "go.wit.com/log" "go.wit.com/gui/widget" ) @@ -34,6 +31,8 @@ type node struct { WidgetType widget.WidgetType ParentId int // parent ID + state widget.State + // a reference name for programming and debuggign. Must be unique progname string @@ -139,6 +138,7 @@ func convertString(val any) string { } */ +/* // this is in common.go, do not move it func getString(A any) string { if A == nil { @@ -167,6 +167,7 @@ func getString(A any) string { } return "" } +*/ // this is in common.go, do not move it func addNode(a *widget.Action) *node { @@ -175,6 +176,8 @@ func addNode(a *widget.Action) *node { n.WidgetId = a.WidgetId n.ParentId = a.ParentId + n.state = a.State + // copy the data from the action message n.progname = a.ProgName n.value = a.Value -- cgit v1.2.3