From 784eac740fe3256d46f47a6981a280d6e6eb9b30 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 5 Mar 2025 03:00:11 -0600 Subject: [PATCH] testing code --- eventBindings.go | 2 ++ help.go | 2 +- table.go | 10 +++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eventBindings.go b/eventBindings.go index 47b6737..9819706 100644 --- a/eventBindings.go +++ b/eventBindings.go @@ -78,6 +78,8 @@ func theSuperMouse(g *gocui.Gui, v *gocui.View) error { func theNotsure(g *gocui.Gui, v *gocui.View) error { log.Info("got to theNotsure(). now what? dark =", me.dark) me.refresh = true + log.Info("running VerifyParentId()") + me.treeRoot.VerifyParentId() /* if me.debug { log.Info("debugging off") diff --git a/help.go b/help.go index e6294e8..8bdf240 100644 --- a/help.go +++ b/help.go @@ -1,7 +1,7 @@ -// Copyright 2014 The gocui Authors. All rights reserved. // Copyright 2017-2025 WIT.COM Inc. All rights reserved. // Use of this source code is governed by the GPL 3.0 +// Prior Copyright 2014 The gocui Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/table.go b/table.go index a6f31e6..afad70b 100644 --- a/table.go +++ b/table.go @@ -91,8 +91,16 @@ func (tk *guiWidget) deleteWidget() { p := tk.parent for i, child := range p.children { if tk == child { - log.Info("deleteWidget() found parent with child to delete:", i, child.cuiName) + log.Info("deleteWidget() found parent with child to delete:", i, child.cuiName, child.WidgetId()) p.children = slices.Delete(p.children, i, i+1) } } + tk.deleteTree() +} + +func (tk *guiWidget) deleteTree() { + for _, child := range tk.children { + child.deleteTree() + } + tk.Hide() }