move to SetText()
    use SetChecked()

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-26 11:11:47 -06:00
parent 3a1c310d77
commit a22d940e81
4 changed files with 12 additions and 7 deletions

4
go.mod
View File

@ -3,7 +3,7 @@ module go.wit.com/lib/gadgets
go 1.21.4
require (
go.wit.com/gui v0.13.11
go.wit.com/gui v0.13.13
go.wit.com/log v0.5.6
)
@ -11,5 +11,5 @@ require (
go.wit.com/dev/alexflint/arg v1.4.5 // indirect
go.wit.com/dev/alexflint/scalar v1.2.1 // indirect
go.wit.com/dev/davecgh/spew v1.1.4 // indirect
go.wit.com/widget v1.1.6 // indirect
go.wit.com/widget v1.1.7 // indirect
)

8
go.sum
View File

@ -4,9 +4,9 @@ go.wit.com/dev/alexflint/scalar v1.2.1 h1:loXOcbVnd+8YeJRLey+XXidecBiedMDO00zQ26
go.wit.com/dev/alexflint/scalar v1.2.1/go.mod h1:+rYsfxqdI2cwA8kJ7GCMwWbNJvfvWUurOCXLiwdTtSs=
go.wit.com/dev/davecgh/spew v1.1.4 h1:C9hj/rjlUpdK+E6aroyLjCbS5MFcyNUOuP1ICLWdNek=
go.wit.com/dev/davecgh/spew v1.1.4/go.mod h1:sihvWmnQ/09FWplnEmozt90CCVqBtGuPXM811tgfhFA=
go.wit.com/gui v0.13.11 h1:d74Ko/XFZYR25P/AZfCQaVO2CuGh1BSjdUp1wjktdDg=
go.wit.com/gui v0.13.11/go.mod h1:v2VgnOL3dlZ13KclYeedZ1cd20nQdvwjyJTNKvFX3DA=
go.wit.com/gui v0.13.13 h1:rIaEIYol92gHbP/JkJCmFdzo7u5Bc3WoqBA3hwttL6o=
go.wit.com/gui v0.13.13/go.mod h1:xdCB1u4UqyaijwZnDdO9510nBlbf4Cdgfsd+R7VtUDo=
go.wit.com/log v0.5.6 h1:rDC3ju95zfEads4f1Zm+QMkqjZ39CsYAT/UmQQs7VP4=
go.wit.com/log v0.5.6/go.mod h1:BaJBfHFqcJSJLXGQ9RHi3XVhPgsStxSMZRlaRxW4kAo=
go.wit.com/widget v1.1.6 h1:av2miF5vlohMfARA/QGPTPfgW/ADup1c+oeAOKgroPY=
go.wit.com/widget v1.1.6/go.mod h1:I8tnD3x3ECbB/CRNnLCdC+uoyk7rK0AEkzK1bQYSqoQ=
go.wit.com/widget v1.1.7 h1:Gy84I2bD8CMna7NcKBX4sRLR8do6x6mVYX0Ui43f3is=
go.wit.com/widget v1.1.7/go.mod h1:I8tnD3x3ECbB/CRNnLCdC+uoyk7rK0AEkzK1bQYSqoQ=

View File

@ -114,7 +114,7 @@ func NewLogFlag(n *gui.Node, lf *log.LogFlag) *LogFlag {
f.lf.SetBool(f.checkbox.Bool())
}
f.checkbox.SetValue(lf.Bool())
f.checkbox.SetChecked(lf.Bool())
return &f
}

View File

@ -26,6 +26,11 @@ func (n *OneLiner) String() string {
return n.v.String()
}
func (n *OneLiner) SetText(s string) *OneLiner {
n.SetValue(s)
return n
}
func (n *OneLiner) SetValue(s string) *OneLiner {
log.Log(GADGETS, "OneLiner.Set() =", s)
n.v.SetLabel(s)