summaryrefslogtreecommitdiff
path: root/andlabs/addText.go
blob: 75c8c7daaae12f55bc6b4394b53887b78c2fd72f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package main

import (
	"go.wit.com/log"
	"go.wit.com/gui/widget"
)

func (n *node) addText(a *widget.Action) {
	log.Log(CHANGE, "addText() START with a.Value =", a.Value)
	t := n.tk
	if (t == nil) {
		log.Log(ERROR, "addText error. tk == nil", n.progname, n.WidgetId)
		return
	}
	log.Log(CHANGE, "addText() Attempt on", n.WidgetType, "with", a.Value)

	switch n.WidgetType {
	case widget.Dropdown:
		n.addDropdownName(getString(a.Value))
	case widget.Combobox:
		n.addComboboxName(getString(a.Value))
	default:
		log.Log(ERROR, "plugin Send() Don't know how to addText on", n.WidgetType, "yet", a.ActionType)
	}
	log.Log(CHANGE, "addText() END with a.Value =", a.Value)
}