fix checkbox

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-02-01 11:59:37 -06:00
parent 10ae244d5a
commit c22fc7b602
1 changed files with 11 additions and 10 deletions

View File

@ -18,7 +18,7 @@ import (
func (me *TreeInfo) SendEnableDebugger() {
if me.callback == nil {
log.Warn("SendUserEvent() toolkit panic() callback == nil")
log.Warn("SendEnableDebugger() callback == nil")
return
}
var a widget.Action
@ -30,44 +30,44 @@ func (me *TreeInfo) SendEnableDebugger() {
func (me *TreeInfo) SendToolkitLoad(s string) {
if me.callback == nil {
log.Warn("SendUserEvent() toolkit load callback == nil")
log.Warn("SendToolkitLoad() callback == nil")
return
}
var a widget.Action
a.ActionType = widget.ToolkitLoad
a.ProgName = me.PluginName
a.Value = s
log.Warn("SendUserEvent() START: toolkit load", s)
log.Warn("SendToolkitLoad() START: toolkit load", s)
me.callback <- a
log.Warn("SendUserEvent() END: toolkit load", s)
log.Warn("SendToolkitLoad() END: toolkit load", s)
return
}
func (me *TreeInfo) SendToolkitPanic() {
if me.callback == nil {
log.Warn("SendUserEvent() toolkit panic() callback == nil")
log.Warn("SendToolkitPanic() callback == nil")
return
}
var a widget.Action
a.ActionType = widget.ToolkitPanic
a.ProgName = me.PluginName
log.Log(TREE, "SendUserEvent() START: toolkit panic()")
log.Log(TREE, "SendToolkitPanic() START")
me.callback <- a
log.Log(TREE, "SendUserEvent() END: toolkit panic()")
log.Log(TREE, "SendToolkitPanic() END")
return
}
func (me *TreeInfo) SendWindowCloseEvent(n *Node) {
if me.callback == nil {
log.Warn("SendUserEvent() callback == nil", n.WidgetId)
log.Warn("SendWindowClose() callback == nil", n.WidgetId)
return
}
var a widget.Action
a.WidgetId = n.WidgetId
a.ActionType = widget.CloseWindow
log.Log(TREE, "SendUserEvent() START: user closed the window", n.GetProgName())
log.Log(TREE, "SendWindowClose() START: user closed the window", n.GetProgName())
me.callback <- a
log.Log(TREE, "SendUserEvent() END: user closed the window", n.GetProgName())
log.Log(TREE, "SendWindowClose() END: user closed the window", n.GetProgName())
return
}
@ -80,6 +80,7 @@ func (me *TreeInfo) SendUserEvent(n *Node) {
var a widget.Action
a.WidgetId = n.WidgetId
a.Value = n.State.Value
a.State = n.State
a.ActionType = widget.User
if n.WidgetType == widget.Checkbox {
log.Log(TREE, "SendUserEvent() checkbox going to send:", a.Value)