summaryrefslogtreecommitdiff
path: root/debug.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-06-03 12:56:33 -0700
committerJeff Carr <[email protected]>2019-06-03 12:56:33 -0700
commit3a94b27b6308b41f54753b5ae0e38ed97837e440 (patch)
tree8e9c25b7b41171484aa6b51af4bc87f3f0ea645d /debug.go
parentcc9edaab3a6d7594fac6ce082b3b2feed2114ced (diff)
better display and debugging
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'debug.go')
-rw-r--r--debug.go42
1 files changed, 24 insertions, 18 deletions
diff --git a/debug.go b/debug.go
index 42937d1..9d862bc 100644
--- a/debug.go
+++ b/debug.go
@@ -20,24 +20,8 @@ func WatchGUI() {
for {
if (count > 20) {
log.Println("Sleep() in watchGUI()")
- for i, window := range Data.Windows {
- log.Println("watchGUI() Data.Windows", i, "Name =", window.Name)
- for name, abox := range window.BoxMap {
- log.Printf("\twatchGUI() BOX mapname=%-12s abox.Name=%-12s", name, abox.Name)
- /*
- if (name == "DEBUG") {
- log.Println("\t\twatchGUI() BOX abox =", reflect.TypeOf(abox))
- win := abox.Window
- log.Println("\t\twatchGUI() BOX win =", reflect.TypeOf(win))
- area := win.Area
- log.Println("\t\twatchGUI() BOX area =", reflect.TypeOf(area), area.UiArea)
- // spew.Dump(area.UiArea)
- // area.UiArea.Show()
- // time.Sleep(2000 * time.Millisecond)
- // os.Exit(0)
- }
- */
- }
+ if (Config.Debug) {
+ DumpBoxes()
}
count = 0
}
@@ -46,6 +30,28 @@ func WatchGUI() {
}
}
+func DumpBoxes() {
+ for i, window := range Data.Windows {
+ log.Println("watchGUI() Data.Windows", i, "Name =", window.Name)
+ for name, abox := range window.BoxMap {
+ log.Printf("\twatchGUI() BOX mapname=%-12s abox.Name=%-12s", name, abox.Name)
+ /*
+ if (name == "DEBUG") {
+ log.Println("\t\twatchGUI() BOX abox =", reflect.TypeOf(abox))
+ win := abox.Window
+ log.Println("\t\twatchGUI() BOX win =", reflect.TypeOf(win))
+ area := win.Area
+ log.Println("\t\twatchGUI() BOX area =", reflect.TypeOf(area), area.UiArea)
+ // spew.Dump(area.UiArea)
+ // area.UiArea.Show()
+ // time.Sleep(2000 * time.Millisecond)
+ // os.Exit(0)
+ }
+ */
+ }
+ }
+}
+
func addTableTab() {
var parts []TableColumnData