summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.go24
1 files changed, 23 insertions, 1 deletions
diff --git a/init.go b/init.go
index a079b7d..9fec7a3 100644
--- a/init.go
+++ b/init.go
@@ -30,8 +30,16 @@ func toolkitInit() {
log.Info("gocui toolkitInit() me.ok =", me.ok)
if me.baseGui == nil {
log.Info("gocui baseGui is still nil")
- os.Exit(-1)
+ standardExit()
}
+ if me.treeRoot == nil {
+ log.Info("gocui treeRoot is still nil")
+ standardExit()
+ }
+ w := me.treeRoot.TK.(*guiWidget)
+ w.dumpTree("MM")
+ w.dumpWindows("WW")
+
me.baseGui.Update(testRefresh)
log.Info("gocui toolkitInit() trying showHelp() me.ok =", me.ok)
showHelp()
@@ -62,6 +70,20 @@ func toolkitInit() {
var toggle bool
for i := 0; i < 6; i++ {
+ w := me.treeRoot.TK.(*guiWidget)
+ w.dumpTree("MM")
+ w.dumpWindows("WW")
+
+ if me.notify.clock.tk != nil {
+ // also double check the gocui view exists
+ if me.notify.clock.tk.v != nil {
+ me.notify.clock.tk.v.Clear()
+ me.notify.clock.tk.labelN = time.Now().Format("15:04:05")
+ me.notify.clock.tk.v.WriteString(me.notify.clock.tk.labelN)
+ }
+ } else {
+ log.Info("gocui toolkitInit() clock.tv.v == nil me.ok =", me.ok)
+ }
if toggle {
toggle = false
time.Sleep(1 * time.Second)