always write to /tmp/ also
This commit is contained in:
parent
6d1dfed3db
commit
da54c0f039
33
init.go
33
init.go
|
@ -40,26 +40,15 @@ func toolkitInit() {
|
||||||
w.dumpTree("MM")
|
w.dumpTree("MM")
|
||||||
w.dumpWindows("WW")
|
w.dumpWindows("WW")
|
||||||
|
|
||||||
|
// SETUP HELP START
|
||||||
me.baseGui.Update(testRefresh)
|
me.baseGui.Update(testRefresh)
|
||||||
log.Info("gocui toolkitInit() trying showHelp() me.ok =", me.ok)
|
log.Info("gocui toolkitInit() trying showHelp() me.ok =", me.ok)
|
||||||
showHelp()
|
showHelp()
|
||||||
log.Info("gocui toolkitInit() trying showHelp() me.ok =", me.ok)
|
|
||||||
hideHelp()
|
hideHelp()
|
||||||
log.Info("gocui toolkitInit() trying showHelp() me.ok =", me.ok)
|
|
||||||
showHelp()
|
showHelp()
|
||||||
/*
|
// SETUP HELP END
|
||||||
if me.stdout.outputOnTop {
|
|
||||||
me.stdout.outputOnTop = false
|
// SETUP STDOUT START
|
||||||
setThingsOnTop()
|
|
||||||
} else {
|
|
||||||
me.stdout.outputOnTop = true
|
|
||||||
setThingsOnTop()
|
|
||||||
}
|
|
||||||
relocateStdoutOffscreen()
|
|
||||||
log.Info("refresh triggered")
|
|
||||||
*/
|
|
||||||
// me.newWindowTrigger <- me.treeRoot.TK.(*guiWidget)
|
|
||||||
// time.Sleep(1 * time.Second)
|
|
||||||
time.Sleep(300 * time.Millisecond)
|
time.Sleep(300 * time.Millisecond)
|
||||||
log.Info("gocui toolkitInit() me.ok =", me.ok)
|
log.Info("gocui toolkitInit() me.ok =", me.ok)
|
||||||
me.baseGui.Update(testRefresh)
|
me.baseGui.Update(testRefresh)
|
||||||
|
@ -68,11 +57,12 @@ func toolkitInit() {
|
||||||
me.stdout.init = true
|
me.stdout.init = true
|
||||||
relocateStdoutOffscreen()
|
relocateStdoutOffscreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
me.stdout.outputOnTop = false
|
me.stdout.outputOnTop = false
|
||||||
setThingsOnTop()
|
setThingsOnTop()
|
||||||
|
// SETUP STDOUT END
|
||||||
|
|
||||||
|
// PUT INIT DEBUG COOE HERE
|
||||||
var toggle bool
|
var toggle bool
|
||||||
for i := 0; i < 3; i++ {
|
for i := 0; i < 3; i++ {
|
||||||
w := me.treeRoot.TK.(*guiWidget)
|
w := me.treeRoot.TK.(*guiWidget)
|
||||||
|
@ -88,9 +78,9 @@ func toolkitInit() {
|
||||||
log.Info("gocui toolkitInit() put testing false stuff here")
|
log.Info("gocui toolkitInit() put testing false stuff here")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Info("gocui toolkitInit() trying showHelp() me.ok =", me.ok)
|
// PUT INIT DEBUG COOE HERE END
|
||||||
showHelp()
|
|
||||||
|
|
||||||
|
// TEST TEXTBOX START
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
log.Info("gocui toolkitInit() me.ok =", me.ok)
|
log.Info("gocui toolkitInit() me.ok =", me.ok)
|
||||||
me.baseGui.Update(testRefresh)
|
me.baseGui.Update(testRefresh)
|
||||||
|
@ -99,12 +89,7 @@ func toolkitInit() {
|
||||||
initTextbox()
|
initTextbox()
|
||||||
me.textbox.tk.prepTextbox()
|
me.textbox.tk.prepTextbox()
|
||||||
}
|
}
|
||||||
// tk.makeWindowActive()
|
// TEST TEXTBOX END
|
||||||
|
|
||||||
time.Sleep(1 * time.Second)
|
|
||||||
log.Info("gocui toolkitInit() me.ok =", me.ok)
|
|
||||||
// me.baseGui.Close()
|
|
||||||
// os.Exit(-1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func toolkitClose() {
|
func toolkitClose() {
|
||||||
|
|
|
@ -161,13 +161,15 @@ func (w stdout) Write(p []byte) (n int, err error) {
|
||||||
|
|
||||||
lines := strings.Split(strings.TrimSpace(string(p)), "\n")
|
lines := strings.Split(strings.TrimSpace(string(p)), "\n")
|
||||||
me.stdout.outputS = append(me.stdout.outputS, lines...)
|
me.stdout.outputS = append(me.stdout.outputS, lines...)
|
||||||
|
fmt.Fprint(outf, string(p))
|
||||||
|
|
||||||
return len(p), nil
|
return len(p), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *guiWidget) Write(p []byte) (n int, err error) {
|
func (w *guiWidget) Write(p []byte) (n int, err error) {
|
||||||
if w == nil {
|
|
||||||
lines := strings.Split(strings.TrimSpace(string(p)), "\n")
|
lines := strings.Split(strings.TrimSpace(string(p)), "\n")
|
||||||
|
fmt.Fprint(outf, string(p))
|
||||||
|
if w == nil {
|
||||||
me.stdout.outputS = append(me.stdout.outputS, lines...)
|
me.stdout.outputS = append(me.stdout.outputS, lines...)
|
||||||
return len(p), nil
|
return len(p), nil
|
||||||
}
|
}
|
||||||
|
@ -175,7 +177,6 @@ func (w *guiWidget) Write(p []byte) (n int, err error) {
|
||||||
me.writeMutex.Lock()
|
me.writeMutex.Lock()
|
||||||
defer me.writeMutex.Unlock()
|
defer me.writeMutex.Unlock()
|
||||||
|
|
||||||
lines := strings.Split(strings.TrimSpace(string(p)), "\n")
|
|
||||||
me.stdout.outputS = append(me.stdout.outputS, lines...)
|
me.stdout.outputS = append(me.stdout.outputS, lines...)
|
||||||
|
|
||||||
tk := me.stdout.tk
|
tk := me.stdout.tk
|
||||||
|
|
|
@ -54,8 +54,6 @@ func addWidget(n *tree.Node) {
|
||||||
// tk.setColor(&colorWindow)
|
// tk.setColor(&colorWindow)
|
||||||
me.newWindowTrigger <- tk
|
me.newWindowTrigger <- tk
|
||||||
redoWindows(0, 0)
|
redoWindows(0, 0)
|
||||||
hideHelp()
|
|
||||||
showHelp()
|
|
||||||
return
|
return
|
||||||
case widget.Stdout:
|
case widget.Stdout:
|
||||||
tk.labelN = "moreSTDOUT"
|
tk.labelN = "moreSTDOUT"
|
||||||
|
|
Loading…
Reference in New Issue