trying to fix SHOW VM
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
5caf303828
commit
a60b529a4b
33
main.go
33
main.go
|
@ -163,12 +163,25 @@ func mainMouseClick(b *gui.GuiButton) {
|
|||
log.Println("mainMouseClick() BACK IN MAIN CONTROL PANEL CODE (button is nil) WHY DID THIS HAPPEN?")
|
||||
onExit(fmt.Errorf("mainMouseClick() got b = nil"))
|
||||
}
|
||||
spew.Dump(b.Account)
|
||||
log.Println("mainMouseClick() b.Action =", b.Action)
|
||||
log.Println("mainMouseClick() b.Account =", b.Account)
|
||||
spew.Dump(b.Account)
|
||||
log.Println("mainMouseClick() b.Box =", b.Box)
|
||||
|
||||
var gw *gui.GuiWindow
|
||||
if (b.GW != nil) {
|
||||
gw = b.GW
|
||||
} else {
|
||||
if (b.Box != nil) {
|
||||
gw = b.Box.W
|
||||
}
|
||||
}
|
||||
if (gw == nil) {
|
||||
log.Println("THIS BUTTON IS BROKEN gw = nil")
|
||||
log.Println("THIS BUTTON IS BROKEN gw = nil")
|
||||
log.Println("THIS BUTTON IS BROKEN gw = nil")
|
||||
panic("something")
|
||||
}
|
||||
|
||||
// gui.Data.Current = b.Account
|
||||
log.Println("mainMouseClick() BACK IN CONTROL PANEL CODE b =", b)
|
||||
|
@ -345,11 +358,14 @@ func mainMouseClick(b *gui.GuiButton) {
|
|||
} else if (b.Action == "SHOW VM") {
|
||||
// gui.Data.CurrentVM = b.VM
|
||||
if (gui.Data.Debug) {
|
||||
log.Println("\tATTEMPTING TO SHOW VM IN WINDOW")
|
||||
// log.Println("\tATTEMPTING TO SHOW VM IN WINDOW")
|
||||
// go gui.GoShowVM()
|
||||
|
||||
log.Println("\tATTEMPTING TO SHOW VM TAB gw = ", gw)
|
||||
gui.CreateVmBox(gw, b.VM)
|
||||
} else {
|
||||
log.Println("\tATTEMPTING TO SHOW VM TAB", b.T)
|
||||
gui.CreateVmBox(gw, b.T, b.VM)
|
||||
log.Println("\tATTEMPTING TO SHOW VM TAB gw = ", gw)
|
||||
gui.CreateVmBox(gw, b.VM)
|
||||
}
|
||||
} else if (b.Action == "SHOW") {
|
||||
log.Println("\tTRIGGER DISPLAY ACCOUNT")
|
||||
|
@ -407,6 +423,7 @@ func r() {
|
|||
log.Println("recover() SOMETHING IS REALLY BROKEN r =", r)
|
||||
log.Println("recover() SOMETHING IS REALLY BROKEN r =", r)
|
||||
log.Println("recover() SOMETHING IS REALLY BROKEN r =", r)
|
||||
panic("something")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -432,8 +449,12 @@ func watchGUI() {
|
|||
for {
|
||||
if (count > 10) {
|
||||
log.Println("Sleep() in watchGUI() gui.Data.State =", gui.Data.State)
|
||||
for key, element := range gui.Data.Windows {
|
||||
log.Println("watchGUI() gui.Data.Windows =", key, element.Action)
|
||||
for key, window := range gui.Data.Windows {
|
||||
log.Println("watchGUI() gui.Data.Windows =", key, window)
|
||||
log.Println("watchGUI() gui.Data.Windows.Action =", key, window.Action)
|
||||
for name, box := range window.BoxMap {
|
||||
log.Println("watchGUI() name, box =", name, box)
|
||||
}
|
||||
}
|
||||
count = 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue