init is more correct now
This commit is contained in:
parent
0124d25c34
commit
660d9e7e3a
24
init.go
24
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)
|
||||
|
|
Loading…
Reference in New Issue