package main import "log" import "time" import "git.wit.com/wit/gui" var guiDS *gui.GuiDS func main() { guiDS = gui.GetDataStructures() guiDS.ButtonClick = buttonClick gui.GoMainWindow() // go gui.GoMainWindow() watchGUI() } func buttonClick(i int, s string) { log.Println("test2 buttonClick() i, s =", i, s) gui.ShowAccountTab() } func watchGUI() { log.Println("Sleep(2000)") time.Sleep(2000 * time.Millisecond) for { log.Println("Sleep()") time.Sleep(200 * time.Millisecond) if (guiDS.State == "splash") { log.Println("Display the splash box") guiDS.State = "done" } if (guiDS.State == "kill") { log.Println("gui.State = kill") log.Println("gui.State = kill") log.Println("gui.State = kill") guiDS.State = "account1" } if (guiDS.State == "account1") { log.Println("Display the splash box") guiDS.State = "done" } } }