From 1fdf786a72fd4af0c1acca45b250b5f66ef3e31b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 21 Jan 2024 14:44:47 -0600 Subject: visable state is honored. TODO: fix hide/show Signed-off-by: Jeff Carr --- common.go | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) (limited to 'common.go') diff --git a/common.go b/common.go index c897c2c..855c11c 100644 --- a/common.go +++ b/common.go @@ -226,7 +226,7 @@ func (n *Node) Margin() *Node { n.margin = true n.changed = true - log.Warn("Margin()", n.WidgetType, n.progname) + log.Log(INFO, "Margin()", n.WidgetType, n.progname) // inform the toolkits sendAction(n, widget.Margin) return n @@ -259,7 +259,7 @@ func (n *Node) Pad() *Node { n.pad = true n.changed = true - log.Warn("Pad()", n.WidgetType, n.progname) + log.Log(INFO, "Pad()", n.WidgetType, n.progname) // inform the toolkits sendAction(n, widget.Pad) return n @@ -323,7 +323,8 @@ func (n *Node) Hidden() bool { func (n *Node) Ready() bool { if n == nil { - log.Warn("Ready() got node == nil") + log.Log(NOW, "Ready() got node == nil. TODO: find code trace to here") + panic("ready got nil") // TODO: figure out if you can identify the code trace // to help find the root cause return false @@ -343,35 +344,6 @@ func TreeRoot() *Node { // // -// This should not really do anything. as per the docs, the "Standard()" way -// should be the default way -/* -func (n *Node) Standard() *Node { - log.Warn("Standard() not implemented yet") - return n -} - -func (n *Node) SetMargin() *Node { - log.Warn("DoMargin() not implemented yet") - return n -} -*/ - -/* -func (n *Node) Window(title string) *Node { - log.Warn("Window()", n) - return n.NewWindow(title) -} -*/ - -/* -func (n *Node) SetNext(w int, h int) { - n.NextW = w - n.NextH = h - log.Info("SetNext() w,h =", n.NextW, n.NextH) -} -*/ - /* // string handling examples that might be helpful for normalizeInt() isAlpha := regexp.MustCompile(`^[A-Za-z]+$`).MatchString -- cgit v1.2.3