From fd4af0e0dbdd4d8875e2d9dfb4cda84261cacaea Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 1 Jun 2019 21:15:55 -0700 Subject: spash screen works again Signed-off-by: Jeff Carr --- debug.go | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'debug.go') diff --git a/debug.go b/debug.go index 7ea50b8..dfaca26 100644 --- a/debug.go +++ b/debug.go @@ -6,6 +6,7 @@ import "fmt" import "strings" import "os/exec" import "runtime" +import "reflect" import "github.com/andlabs/ui" import _ "github.com/andlabs/ui/winmanifest" @@ -148,3 +149,37 @@ func runCommand(cmdArgs []string) { log.Println("runCommand() OTHERWISE INFORM THE USER") log.Println("runCommand() END") } + +// +// this watches the GUI primarily to process protobuf's +// this is pointless or wrong but I use it for debugging +// +func WatchGUI() { + count := 0 + + for { + if (count > 20) { + log.Println("Sleep() in watchGUI() Data.State =", Data.State) + for i, window := range Data.Windows { + log.Println("watchGUI() Data.Windows i =", i, "Action =", window.Action) + for name, abox := range window.BoxMap { + log.Println("\twatchGUI() BOX name =", name) + if (name == "SplashArea3") { + 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) + } + } + } + count = 0 + } + count += 1 + time.Sleep(200 * time.Millisecond) + } +} -- cgit v1.2.3