summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/main.go b/main.go
index f86dc54..91dea02 100644
--- a/main.go
+++ b/main.go
@@ -107,7 +107,7 @@ func watchCallback() {
log.Warn("guiChan() Enable Debugging Window")
log.Warn("guiChan() TODO: not implemented")
log.Warn("guiChan() Listing Toolkits:")
- PLUG.Set(true)
+ PLUG.SetBool(true)
me.rootNode.ListToolkits()
me.rootNode.ListChildren(true)
/*
@@ -134,7 +134,16 @@ func watchCallback() {
// TODO: implement throttling someday
func (n *Node) gotUserEvent(a widget.Action) {
log.Info("gotUserEvent() received event node =", n.id, n.progname, a.Value)
- n.value = a.Value
+
+ switch n.WidgetType {
+ case widget.Checkbox:
+ // n.checked = a.State.Checked // TODO: do this and/or time to switch to protobuf
+ n.checked = widget.GetBool(a.Value)
+ default:
+ }
+
+ n.SetValue(a.Value)
+ log.Info("gotUserEvent() n.Bool() =", n.Bool(), "n.String() =", n.String())
if n.Custom == nil {
log.Info("a Custom() function was not set for this widget")
return