diff options
Diffstat (limited to 'gui.go')
| -rw-r--r-- | gui.go | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -84,8 +84,8 @@ func AddTableTab(gw *GuiWindow, name string, rowcount int, parts []TableColumnDa var gb *GuiBox gb = new(GuiBox) - gb.EntryMap = make(map[string]*GuiEntry) - gb.EntryMap["test"] = nil +// gb.EntryMap = make(map[string]*GuiEntry) +// gb.EntryMap["test"] = nil vbox := ui.NewVerticalBox() vbox.SetPadded(true) @@ -214,17 +214,17 @@ func GetText(box *GuiBox, name string) string { log.Println("gui.GetText() ERROR box == nil") return "" } - if (box.EntryMap == nil) { - log.Println("gui.GetText() ERROR b.Box.EntryMap == nil") + if (box.Window.EntryMap == nil) { + log.Println("gui.GetText() ERROR b.Box.Window.EntryMap == nil") return "" } - spew.Dump(box.EntryMap) - if (box.EntryMap[name] == nil) { - log.Println("gui.GetText() ERROR box.EntryMap[", name, "] == nil ") + spew.Dump(box.Window.EntryMap) + if (box.Window.EntryMap[name] == nil) { + log.Println("gui.GetText() ERROR box.Window.EntryMap[", name, "] == nil ") return "" } - e := box.EntryMap[name] - log.Println("gui.GetText() box.EntryMap[", name, "] = ", e.UiEntry.Text()) + e := box.Window.EntryMap[name] + log.Println("gui.GetText() box.Window.EntryMap[", name, "] = ", e.UiEntry.Text()) log.Println("gui.GetText() END") return e.UiEntry.Text() } @@ -233,17 +233,17 @@ func SetText(box *GuiBox, name string, value string) error { if (box == nil) { return fmt.Errorf("gui.SetText() ERROR box == nil") } - if (box.EntryMap == nil) { - return fmt.Errorf("gui.SetText() ERROR b.Box.EntryMap == nil") + if (box.Window.EntryMap == nil) { + return fmt.Errorf("gui.SetText() ERROR b.Box.Window.EntryMap == nil") } - spew.Dump(box.EntryMap) - if (box.EntryMap[name] == nil) { - return fmt.Errorf("gui.SetText() ERROR box.EntryMap[", name, "] == nil ") + spew.Dump(box.Window.EntryMap) + if (box.Window.EntryMap[name] == nil) { + return fmt.Errorf("gui.SetText() ERROR box.Window.EntryMap[", name, "] == nil ") } - e := box.EntryMap[name] - log.Println("gui.SetText() box.EntryMap[", name, "] = ", e.UiEntry.Text()) + e := box.Window.EntryMap[name] + log.Println("gui.SetText() box.Window.EntryMap[", name, "] = ", e.UiEntry.Text()) e.UiEntry.SetText(value) - log.Println("gui.SetText() box.EntryMap[", name, "] = ", e.UiEntry.Text()) + log.Println("gui.SetText() box.Window.EntryMap[", name, "] = ", e.UiEntry.Text()) log.Println("gui.SetText() END") return nil } @@ -295,7 +295,7 @@ func AddEntry(box *GuiBox, name string) *GuiEntry { box.UiBox.Append(ue, false) ge.UiEntry = ue - box.EntryMap[name] = ge + box.Window.EntryMap[name] = ge return ge } @@ -344,8 +344,8 @@ func AddGenericBox(gw *GuiWindow) *GuiBox { var gb *GuiBox gb = new(GuiBox) - gb.EntryMap = make(map[string]*GuiEntry) - gb.EntryMap["test"] = nil +// gb.EntryMap = make(map[string]*GuiEntry) +// gb.EntryMap["test"] = nil vbox := ui.NewVerticalBox() vbox.SetPadded(true) |
