diff options
| author | Jeff Carr <[email protected]> | 2024-01-17 21:21:29 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-17 21:21:29 -0600 |
| commit | a6a3e1193fa7c77165f3ed2eb0031f319b4abdd0 (patch) | |
| tree | 2c5a9fbf4dbc5f7bd5cb235542082da5eba342c6 /debug.go | |
| parent | 8ef3fc7a73a004385d36561c6c8acc4be7e3e24b (diff) | |
work around a toolkit panic()v0.12.11
things should work when
GUI is not really there
Int() and Bool()
helloworld works
compiles and runs
RawWindow shouldn't auto exit
add StandardExit()
Signed-off-by: Jeff Carr <[email protected]>
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'debug.go')
| -rw-r--r-- | debug.go | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -7,6 +7,7 @@ package gui import ( "errors" "strconv" + "strings" "go.wit.com/log" "go.wit.com/gui/widget" @@ -55,13 +56,29 @@ func (n *Node) dumpWidget(b bool) string { } info = n.WidgetType.String() - d = strconv.Itoa(n.id) + " " + info + " " + n.progname var tabs string for i := 0; i < listChildrenDepth; i++ { tabs = tabs + defaultPadding } + d = strconv.Itoa(n.id) + " " + info + " " + n.GetProgName() + strings.Join(n.Json(), " ") logindent(b, listChildrenDepth, defaultPadding, d) + if b { + switch n.WidgetType { + case widget.Combobox: + logindent(b, listChildrenDepth, defaultPadding, " Dropdown", n.value) + logindent(b, listChildrenDepth, defaultPadding, " Dropdown", n.strings) + case widget.Dropdown: + logindent(b, listChildrenDepth, defaultPadding, " Dropdown", n.value) + logindent(b, listChildrenDepth, defaultPadding, " Dropdown", n.strings) + case widget.Grid: + logindent(b, listChildrenDepth, defaultPadding, " GridSize =", n.X, n.Y) + case widget.Box: + logindent(b, listChildrenDepth, defaultPadding, " Direction =", n.direction) + default: + } + } + return tabs + d } |
