summaryrefslogtreecommitdiff
path: root/andlabs/setText.go
diff options
context:
space:
mode:
Diffstat (limited to 'andlabs/setText.go')
-rw-r--r--andlabs/setText.go31
1 files changed, 16 insertions, 15 deletions
diff --git a/andlabs/setText.go b/andlabs/setText.go
index ecc1066..1dcb2f2 100644
--- a/andlabs/setText.go
+++ b/andlabs/setText.go
@@ -1,18 +1,19 @@
package main
import (
+ "go.wit.com/log"
"go.wit.com/gui/widget"
)
func (n *node) setText(a *widget.Action) {
- log(debugChange, "setText() START with a.S =", a.S)
+ log.Log(CHANGE, "setText() START with a.S =", a.S)
t := n.tk
if (t == nil) {
- log(debugError, "setText error. tk == nil", n.Name, n.WidgetId)
+ log.Log(ERROR, "setText error. tk == nil", n.Name, n.WidgetId)
actionDump(debugError, a)
return
}
- log(debugChange, "setText() Attempt on", n.WidgetType, "with", a.S)
+ log.Log(CHANGE, "setText() Attempt on", n.WidgetType, "with", a.S)
switch n.WidgetType {
case widget.Window:
@@ -30,7 +31,7 @@ func (n *node) setText(a *widget.Action) {
// TODO: commented out while working on chan
t.uiCheckbox.SetChecked(a.B)
default:
- log(debugError, "setText() unknown", a.ActionType, "on checkbox", n.Name)
+ log.Log(ERROR, "setText() unknown", a.ActionType, "on checkbox", n.Name)
}
case widget.Textbox:
switch a.ActionType {
@@ -49,7 +50,7 @@ func (n *node) setText(a *widget.Action) {
t.uiMultilineEntry.SetText(a.S)
}
default:
- log(debugError, "setText() unknown", a.ActionType, "on checkbox", n.Name)
+ log.Log(ERROR, "setText() unknown", a.ActionType, "on checkbox", n.Name)
}
case widget.Label:
t.uiLabel.SetText(a.S)
@@ -62,7 +63,7 @@ func (n *node) setText(a *widget.Action) {
case widget.Set:
t.uiSlider.SetValue(a.I)
default:
- log(debugError, "setText() unknown", a.ActionType, "on checkbox", n.Name)
+ log.Log(ERROR, "setText() unknown", a.ActionType, "on checkbox", n.Name)
}
case widget.Spinner:
switch a.ActionType {
@@ -71,7 +72,7 @@ func (n *node) setText(a *widget.Action) {
case widget.Set:
t.uiSpinbox.SetValue(a.I)
default:
- log(debugError, "setText() unknown", a.ActionType, "on checkbox", n.Name)
+ log.Log(ERROR, "setText() unknown", a.ActionType, "on checkbox", n.Name)
}
case widget.Dropdown:
switch a.ActionType {
@@ -82,17 +83,17 @@ func (n *node) setText(a *widget.Action) {
var i int = -1
var s string
orig = t.uiCombobox.Selected()
- log(debugChange, "try to set the Dropdown to", a.S, "from", orig)
+ log.Log(CHANGE, "try to set the Dropdown to", a.S, "from", orig)
// try to find the string
for i, s = range t.val {
- log(debugChange, "i, s", i, s)
+ log.Log(CHANGE, "i, s", i, s)
if (a.S == s) {
t.uiCombobox.SetSelected(i)
- log(debugChange, "setText() Dropdown worked.", n.S)
+ log.Log(CHANGE, "setText() Dropdown worked.", n.S)
return
}
}
- log(debugError, "setText() Dropdown did not find:", a.S)
+ log.Log(ERROR, "setText() Dropdown did not find:", a.S)
// if i == -1, then there are not any things in the menu to select
if (i == -1) {
return
@@ -106,7 +107,7 @@ func (n *node) setText(a *widget.Action) {
case widget.GetText:
// t.S = t.s
default:
- log(debugError, "setText() unknown", a.ActionType, "on checkbox", n.Name)
+ log.Log(ERROR, "setText() unknown", a.ActionType, "on checkbox", n.Name)
}
case widget.Combobox:
switch a.ActionType {
@@ -119,10 +120,10 @@ func (n *node) setText(a *widget.Action) {
t.uiEditableCombobox.SetText(a.S)
n.S = a.S
default:
- log(debugError, "setText() unknown", a.ActionType, "on checkbox", n.Name)
+ log.Log(ERROR, "setText() unknown", a.ActionType, "on checkbox", n.Name)
}
default:
- log(debugError, "plugin Send() Don't know how to setText on", n.WidgetType, "yet", a.ActionType)
+ log.Log(ERROR, "plugin Send() Don't know how to setText on", n.WidgetType, "yet", a.ActionType)
}
- log(debugChange, "setText() END with a.S =", a.S)
+ log.Log(CHANGE, "setText() END with a.S =", a.S)
}