diff options
| author | Jeff Carr <[email protected]> | 2025-02-02 13:03:44 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-02 14:52:31 -0600 |
| commit | 676b3a8548debe6ed3ec2898d29df7c9acd07d62 (patch) | |
| tree | 5d5bc5764b521dce945147396894583f5a914aab /debug.go | |
| parent | f2a296064e6befbce4b584f24d474a8ade2c5215 (diff) | |
tinkering
Diffstat (limited to 'debug.go')
| -rw-r--r-- | debug.go | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -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 |
