andlabs/addText.go

29 lines
632 B
Go
Raw Normal View History

package main
import (
"go.wit.com/log"
"go.wit.com/toolkits/tree"
"go.wit.com/widget"
)
func addText(n *tree.Node, s string) {
var tk *guiWidget
tk = n.TK.(*guiWidget)
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", s)
switch n.WidgetType {
case widget.Dropdown:
addDropdownName(n, s)
case widget.Combobox:
addComboboxName(n, s)
default:
log.Log(ERROR, "addText() doesn't work on", n.WidgetType)
}
log.Log(ANDLABS, "addText() END with =", s)
}