summaryrefslogtreecommitdiff
path: root/debug.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-02 13:03:44 -0600
committerJeff Carr <[email protected]>2025-02-02 14:52:31 -0600
commit676b3a8548debe6ed3ec2898d29df7c9acd07d62 (patch)
tree5d5bc5764b521dce945147396894583f5a914aab /debug.go
parentf2a296064e6befbce4b584f24d474a8ade2c5215 (diff)
tinkering
Diffstat (limited to 'debug.go')
-rw-r--r--debug.go21
1 files changed, 20 insertions, 1 deletions
diff --git a/debug.go b/debug.go
index 86fa7ce..b89aa80 100644
--- a/debug.go
+++ b/debug.go
@@ -1,6 +1,8 @@
package tree
import (
+ "fmt"
+
"go.wit.com/log"
"go.wit.com/widget"
)
@@ -20,7 +22,24 @@ func (n *Node) ShowButtons() {
}
func (n *Node) DumpWidget(pad string) {
- log.Log(TREEWARN, "node:", pad, n.WidgetId, ",", n.WidgetType, ",", n.GetProgName())
+ s := n.GetProgName()
+ if s == "" {
+ s = n.CurrentS()
+ }
+ if s == "" {
+ s = n.String()
+ }
+ if s == "" {
+ s = n.ProgName()
+ }
+ if s == "" {
+ s = n.GetLabel()
+ }
+ if s == "" {
+ s = n.State.NewString
+ }
+ end := fmt.Sprintf("%d,%-9s .%s.", n.WidgetId, n.WidgetType, s)
+ log.Log(TREEWARN, "node:", pad, end)
}
var depth int = 0