diff --git a/eventChannel.go b/eventChannel.go index 7a1ade9..e16cc4f 100644 --- a/eventChannel.go +++ b/eventChannel.go @@ -131,14 +131,14 @@ func ReadReceivedData(data *pb.Event, mh *gui.TableData, window *ui.Window, tab setRowValues(mh, row, vm) // create 'fake' button entries for the mouse clicks within tables - var newButtonMap gui.ButtonMap - newButtonMap.Action = "SHOW VM" - newButtonMap.VM = vm // set the button to this VM - newButtonMap.Account = data.Account - newButtonMap.W = window - newButtonMap.T = tab - gui.Data.AllButtons = append(gui.Data.AllButtons, newButtonMap) - mh.Rows[row].HumanData[6].Button = &newButtonMap + var newGuiButton gui.GuiButton + newGuiButton.Action = "SHOW VM" + newGuiButton.VM = vm // set the button to this VM + newGuiButton.Account = data.Account + newGuiButton.W = window + newGuiButton.T = tab + gui.Data.AllButtons = append(gui.Data.AllButtons, newGuiButton) + mh.Rows[row].HumanData[6].Button = &newGuiButton mh.Rows[row].HumanData[6].VM = vm mh.Rows[row].VM = vm diff --git a/main.go b/main.go index ae3cd93..3992c7c 100644 --- a/main.go +++ b/main.go @@ -155,7 +155,7 @@ func main() { // at least, that is the current design because I thought it // might be a good approach. Time will tell... // -func mainMouseClick(b *gui.ButtonMap) { +func mainMouseClick(b *gui.GuiButton) { defer r() // a golang trick to try to not crash on certain errors if (b == nil) { diff --git a/test4/main.go b/test4/main.go index 0c95ec6..9a3eecd 100644 --- a/test4/main.go +++ b/test4/main.go @@ -50,7 +50,7 @@ func main() { // at least, that is the current design because I thought it // might be a good approach. Time will tell... // -func mainMouseClick(b *gui.ButtonMap) { +func mainMouseClick(b *gui.GuiButton) { if (b == nil) { log.Println("mainMouseClick() BACK IN MAIN CONTROL PANEL CODE (button is nil) WHY DID THIS HAPPEN?") log.Println("mainMouseClick() BACK IN MAIN CONTROL PANEL CODE (button is nil) WHY DID THIS HAPPEN?")