From a57a8b5a6348a9142088a0170a3682cdc0ecdb23 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 5 Feb 2024 15:02:09 -0600 Subject: prepare for protobuf Signed-off-by: Jeff Carr --- common.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'common.go') diff --git a/common.go b/common.go index fd9d3b5..3196573 100644 --- a/common.go +++ b/common.go @@ -99,7 +99,7 @@ func (n *Node) Bool() bool { default: } - return widget.GetBool(n.value) + return false } func (n *Node) Int() int { @@ -107,14 +107,13 @@ func (n *Node) Int() int { return -1 } - return widget.GetInt(n.value) + return -1 } func (n *Node) SetBool(b bool) { switch n.WidgetType { case widget.Checkbox: n.checked = b - n.value = b default: log.Warn("WidgetType not bool", n.WidgetType, n.id) } @@ -123,7 +122,7 @@ func (n *Node) SetBool(b bool) { func (n *Node) SetInt(i int) { switch n.WidgetType { default: - n.value = i + // n.value = i // log.Warn("WidgetType not bool", n.WidgetType, n.id) } } @@ -144,7 +143,7 @@ func (n *Node) String() string { default: } - return widget.GetString(n.value) + return widget.GetString(n.currentS) } func (n *Node) Strings() []string { @@ -181,8 +180,8 @@ func (n *Node) AppendText(str string) { if !n.Ready() { return } - tmp := widget.GetString(n.value) + str - n.value = tmp + tmp := n.currentS + str + n.newString = tmp n.changed = true // inform the toolkits -- cgit v1.2.3