summaryrefslogtreecommitdiff
path: root/addText.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-05 12:06:17 -0600
committerJeff Carr <[email protected]>2024-02-05 12:06:17 -0600
commit1e98d2607b0eafb698dc63e7b97d55ecaf416cb5 (patch)
tree001ec93a75bd26668f7312e45b3f21903181ec8f /addText.go
parentfea47363e00f9c02497108484500ad40a88f466c (diff)
use the new tree functions
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'addText.go')
-rw-r--r--addText.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/addText.go b/addText.go
index ed837ea..c6bcdbb 100644
--- a/addText.go
+++ b/addText.go
@@ -9,20 +9,20 @@ import (
func compareStrings(n *tree.Node, ss []string) {
}
-func addText(n *tree.Node, a *widget.Action) {
+func addText(n *tree.Node, s string) {
var tk *guiWidget
tk = n.TK.(*guiWidget)
- log.Log(ANDLABS, "addText() START with a.Value =", a.Value)
+ log.Log(ANDLABS, "addText() START with s =", s)
if tk == nil {
log.Log(ERROR, "addText error. tk == nil", n.State.ProgName, n.WidgetId)
return
}
- log.Log(ANDLABS, "addText() Attempt on", n.WidgetType, "with", a.Value)
+ log.Log(ANDLABS, "addText() Attempt on", n.WidgetType, "with", s)
switch n.WidgetType {
case widget.Dropdown:
- for i, s := range a.State.Strings {
- log.Log(ANDLABS, "a.State.Strings =", i, s)
+ for i, s := range n.State.Strings {
+ log.Log(ANDLABS, "n.State.Strings =", i, s)
_, ok := n.Strings[s]
// If the key exists
if ok {
@@ -35,9 +35,9 @@ func addText(n *tree.Node, a *widget.Action) {
}
}
case widget.Combobox:
- addComboboxName(n, widget.GetString(a.Value))
+ addComboboxName(n, s)
default:
- log.Log(ERROR, "plugin Send() Don't know how to addText on", n.WidgetType, "yet", a.ActionType)
+ log.Log(ERROR, "addText() doesn't work on", n.WidgetType)
}
- log.Log(ANDLABS, "addText() END with a.Value =", a.Value)
+ log.Log(ANDLABS, "addText() END with =", s)
}