Compare commits
No commits in common. "guimaster" and "v0.22.35" have entirely different histories.
20
init.go
20
init.go
|
@ -4,7 +4,6 @@ package main
|
||||||
import (
|
import (
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
|
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
"go.wit.com/toolkits/tree"
|
"go.wit.com/toolkits/tree"
|
||||||
|
@ -114,33 +113,18 @@ func queueMain(currentA widget.Action) {
|
||||||
func guiMain() {
|
func guiMain() {
|
||||||
defer func() {
|
defer func() {
|
||||||
if r := recover(); r != nil {
|
if r := recover(); r != nil {
|
||||||
log.Log(WARN, "YAHOO andlabs GUI recovered in guiMain()")
|
log.Log(WARN, "YAHOOOO Recovered in guiMain application:", r)
|
||||||
|
log.Log(WARN, "Recovered from panic:", r)
|
||||||
log.Log(WARN, "Stack trace:")
|
log.Log(WARN, "Stack trace:")
|
||||||
debug.PrintStack()
|
debug.PrintStack()
|
||||||
log.Log(WARN, "Recovered from panic:", r)
|
|
||||||
log.Log(WARN, "andlabs GUI recovered in guiMain()")
|
|
||||||
log.Log(WARN, "YAHOO andlabs GUI recovered in guiMain()")
|
|
||||||
me.myTree.SendToolkitPanic()
|
me.myTree.SendToolkitPanic()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// TODO: THIS IS THE PROBLEM
|
|
||||||
ui.Main(func() {
|
ui.Main(func() {
|
||||||
// this is a bad hack for now.
|
// this is a bad hack for now.
|
||||||
// a better way would be to spawn ui.Main on the first actual window
|
// a better way would be to spawn ui.Main on the first actual window
|
||||||
// that is supposed to be displayed
|
// that is supposed to be displayed
|
||||||
if r := recover(); r != nil {
|
|
||||||
log.Log(WARN, "YAHOO andlabs GUI recovered in guiMain()")
|
|
||||||
log.Log(WARN, "Stack trace:")
|
|
||||||
debug.PrintStack()
|
|
||||||
log.Log(WARN, "Recovered from panic:", r)
|
|
||||||
log.Log(WARN, "andlabs GUI recovered in guiMain()")
|
|
||||||
log.Log(WARN, "YAHOO andlabs GUI recovered in guiMain()")
|
|
||||||
me.myTree.SendToolkitPanic()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
time.Sleep(time.Second)
|
|
||||||
placeholderUI()
|
placeholderUI()
|
||||||
|
|
||||||
me.myTree.InitOK()
|
me.myTree.InitOK()
|
||||||
|
|
Loading…
Reference in New Issue