diff options
| author | Jeff Carr <[email protected]> | 2019-06-01 21:15:55 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-06-01 21:15:55 -0700 |
| commit | fd4af0e0dbdd4d8875e2d9dfb4cda84261cacaea (patch) | |
| tree | dfccecaafc51ad1eba8650f4e9791ce0d0d3b912 /debug.go | |
| parent | 273a9eccf74f4aaaeccffa0c7eaebd534581a9cb (diff) | |
spash screen works again
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'debug.go')
| -rw-r--r-- | debug.go | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -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) + } +} |
